*** Run this on an ES 150 tic, or somewhere close and **** REMEMBER to set Entries per Direction to 2. *** (I keep forgetting and wonder why it only traded one contract).
For moving the stops, the way it is, it's set to trade 2 contracts, initial stop loss of -7 tics. First profit target is 2 tics. Once the first target is hit, and the price trades equal to/between 5 and 7 tics from Entry, it moves the stop to Entry -1 tic. (You can set this to wherever you want to move it to). Then, when the price trades at 8 tics or higher from Entry, it moves the Stop to Entry plus 4 tics. You will see all this in the code.
I spent hours looking through the forum for how to move the stops simply (like with a SetStopLoss command) and I finally pieced it together. For a beginner programmer like me, a picture is worth a million words. If you are like me, simply telling me to " make a thermorod" doesn't do me any good if I don't know what a "thermorod" is, or what it does.
So, I hope someone can use this and save a LOT of time looking for the answer in the forum. It's in there, but you have to go through quite a bit of posts to put it all together.
Special thanks to Josh for putting some code examples and good explanations in his answers.
Joe

Comment