Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I have cause now for great reflection. I have a job. 9-5 grind. Well actually 7:30-6:00 plus work from home and 24 contact via cell phone. What did I give up? Unemployment, no money, loneliness, bad trading decisions, some very good friends, (Bob, Howard, Francis) and this journal.
What did I gain? People contact. A paycheck. Insurance. Direction.
What do I miss? Programming. Trying to create something from nothing. Stretching my brain.
You know, there have been a LOT of people read this goofy journal. That just amazes me. Are we all searching for that same elusive thing? Must be.
Tonight is a big snow storm (biblical proportions for Kansas City area). Second one in a week! No work tomorrow. I will work from home.
I built an autotrader. I got a lot of ideas from this web site. About 4,000 lines of code and 15 attached programs with another 1,000 lines of code. I call it TradesRunner. It's got a whole bunch of indicators, and it looks cool, but it's just a program. It didn't help me. I was still a bust. I haven't touched NT since I quit in September of 2011, but it all came back this evening and the strategy still works (at least it didn't crash on me). I was pleasantly surprised. I am also pleased at what Big Mike has done with this forum. You're the best Mike! I like the fact that it checks my spelling while I type now. Nice Mike, nice!
I looked back at Encog again too. Not much happening in that arena. I think the concept is still valid but it is so hard, nobody wants to work with it. Everyone is looking for the free handout. The free indicator. The free strategy. Nothings free. Everything has a price.
What to do? Get back into Encog and figure that thing out? Sure why not. I can either do that and post in this journal, or I can continue to mindlessly work on 4 star SUDOKU puzzles only to wad them up and throw them in the trash. Which has more value. I might actually find something in there that could possible work. Who knows? Is there a golden indicator? Is it possible to make a living day-trading? Can you actually do better than the 12% the market averages? I don't know. My brain tells me one thing and my heart tells me something else.
Snow day in Kansas. Hooky day for me. I thought a lot last night about what I need to do. This journal is the longest journal I have ever kept. Why not keep it going. I don't pretend to think this would influence someone's life, but it might have a huge impact on me. So why not keep it going? Nothing ventured, nothing gained.
I went back and revisited where I left off. I read Van Tharp's book "Trade your way to financial success". He talks about a system. Okay I want a system. Here's what I took out of the book (in my mind anyway). All the indicators I have seen seem to run about 50/50. Maybe the market goes up, maybe it goes down. So why not just enter on some indicator, lets say EMA crossing an SMA. As good as anything else I would say. Now the trick is what to do with the results. How do you manage the market after you're in. All I have seen is trailing stops or something like that. Why not a stay-in, reverse or get out indicator? I could do that.
What about all the work I did with Encog? I still think having some form of predictive program would help. Now to recapture where I was. First I will have to go back and re-learn the finer points of Visual C#. Back to the classroom. I still think the LearnVisualStudio.NET is a great site. So I will spend some time there. I will then take that knowledge and work on my Sunspot prediction program: Comparing the Sunspot example in Workbench with the Sunspot example in C# | Heaton Research. The beauty of this program is it will allow me to get my C# program right and then I can translate it into the MACD example in the books. Once I get that working, I can change the MACD to my TradesRunner strategy outputs. That's my plan.
Now I could say this is a waste of time (and many will because there IS NO HOLY GRAIL), but this will keep my mind sharp. Us old people need to learn new things to keep our minds sharp. What I am really looking for is something to help me keep my emotions out of trading and just focus on my plan. I think this path will get me there. And if nothing else, all I did was damage brain cells.
The site (LearnVisualStudio.net) shows how to write in C#. If you want to write indicators for NT, you should take the course. It explains a lot of the things that you have to do in NT when you make indicators. I taught myself how to make indicators by taking other people's indicators and then just trial and error. If I had taken the C# course BEFORE I wrote the indicators, I would have saved myself some serious time. Just a thought.
Spent most of the day watching videos and trying to figure out the Encog Sunspot example. Too long away, too much to remember and a really bad support Wiki. I did get a display however. Encog is an AI program to predict the future from past events (sounds like trading...just a thought).
I put today's work in a chart. The black line is actual sunspot events while the red line is the predicted value. Amplitude is not good, but direction seems to be okay. More work needed. First cut is not bad. It's a start.
Was less than optimistic last night with my SunSpot example. Got to thinking about the data. That data is not like trading data. Trading data flows. It can't go from 150 to 20. It has to move from 150 to 20. So I did some testing. First I started out with an easy one...a sine wave. The results were not too bad.
The problem is this data is predictable. So I ran another model. I used MACD data I had collected. Results this time were pretty interesting.
Now that DOES look interesting. Here's the problem. This data is from a workbench modeling program. Can I do the same thing with the C# program I was working with so many months ago? Time to find out. Dust off the old program and see if I can run the same data and get similar results. Then I have to convert that program to a DLL to run in Ninja Trader. Possible? Maybe. At least I am going to give it a whirl.
My first attempt at making my C# program learn the MACD data did not turn out as I would have hoped. I may need to do some more work here!
As I reflect on where I am right now, I was close before but didn't realize I was close. Let's see if I can get better results.
I use the Encog Workbench and get an output file from a trained network and the display looks like the first attachment.
Not too bad. The Blue is the actual and the Red is the predicted.
Then I go to C# and run the same data and I get the second attachment.
Nothing good about this. The number range isn't even right. I am doing something very wrong here...sigh...
So I figured out half of the problem...it is not moving the normalized numbers back to actual....
Two other problems....not a good prediction and not the right data....more to follow
Great success in that I FINALLY figured out my programming error. It's the worst kind of error, when the program runs, but the answer is just WRONG! Here is a MACD prediction run. Now I only used 6,000 data points to build the network, so it is weak by any definition you use, but the picture is just GREAT.
The picture shows the prediction of 2,000 data points that were not in the original 6,000. The prediction misses some movements, but it's in the same vane which is what I was trying to accomplish.
I am now confident I can put a large amount of data into the predictor and get an even more refined result.
I also ran the routine with TSI Difference and got a much better match predicting the outcome of the indicator.
Next is to add some other indicators and see if I can develop a 'combined' indicator that predicts from patterns of a group of indicators. It seems logical, now can I make it reality.
Working on the transfer of knowledge from one world to the other (Encog to NinjaTrader). I feel like I am speaking three different languages at the same time and they are all alike and all different. The Encog WIKI that explains how to transfer the data is really out there. It doesn't make a lot of sense and I think it has more smoke an mirrors than it needs. Problem is I have to implement the example and get it to work before I get in there and rip the guts out and change it, otherwise I just waste time trying to figure out if my program is bad or the example never worked from the get-go. The picture of the indicator in the example didn't look so hot unless of course you want to loose all of your money....then I think this is truly the Holy Grail! (joke....please don't trade this indicator....PLEASE!)
So things are looking better. I have managed to build an indicator that appears to be predicting the direction of an indicator. I have abandoned trying to make the MACD work and am using the TSI indicator which is based on the work of William Blau in his book, "Momentum, Direction and Divergence" (1995). The reason is a matter of expediency. AI works on normalized data with a range of -1 to +1. The conversion back and forth from normalized to de-normalized data requires the operator to know the min and max of the infeed data. TSI has a max of 100 and min of -100. [The truth of the matter is that if you look at the formula, it only has that because the result is multiplied times 100. So in fact, I could change the formula and not even use the normalization/de-normalization routines.] MACD does not have such limits so the values can be anything and thus makes predictions much harder because you need more infeed data.
Anyway, I took some one-minute tick data, converted the data into TSI values. Ran the artificial intelligence program and got trained data. I plugged the trained data into the Ninja indicator and got a plot. If you look at the first attachment you can see the two values. The top being the actual TSI data and the bottom being the predicted data. The second shows the two in the same panel. What I am looking for is for the predictor (ie the black line) to preceed the green line in changes to TSI. That is I want the AI program to tell me which direction TSI is going to go. The results are VERY hopeful.