Forums › ProRealTime English forum › ProOrder support › EURUSD Morning Entry V1 › Reply To: EURUSD Morning Entry V1
06/13/2019 at 5:28 PM
#100569
Sometimes I will have an optimized variable such as ‘c’ which is used purely to select a set of conditions to use in the back test. This way it is easy to test every possible combination side by side to see which ones have the most benefit. With a lot of conditions it can result in a lot of options but once you have the code then it is a simple thing just to change the c1, c2, c3 conditions to whatever your latest idea uses and paste it into your new strategy.
Something like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
//c = 0 //optimized variable c1 = open > close c2 = open > high[1] c3 = open < low[1] if c = 1 then condition = c1 and c2 and c3 endif if c = 2 then condition = c1 and c2 endif if c = 3 then condition = c1 and c3 endif if c = 4 then condition = c2 and c3 endif if condition then buy 1 contract at market endif |