Forums › ProRealTime English forum › ProOrder support › open range strategy code – lot of success › Reply To: open range strategy code – lot of success
10/08/2017 at 3:18 PM
#48623
I coded this here with a profit target at the 161.8% fibo extension (that was already bad enough) and at least for the dax the result was not very promising.
Here is the code if you want to play with it:
Morning range break out system
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 26 27 28 29 30 31 32 33 34 35 |
defparam cumulateorders=false tradingtime=dayofweek>=1 and dayofweek<=5 and time>=90000 MA=ExponentialAverage[15](close) once tc=0 if time=90000 then RangeTop=highest[11](high[1]) RangeBottom=lowest[11](low[1]) endif if intradaybarindex=0 then tc=0 endif CL=close>RangeTop and close[1]>RangeTop CS=close<RangeBottom and close[1]<RangeBottom box=RangeTop-RangeBottom if not onmarket and not tc and tradingtime then if CL and close>MA then buy 1 contract at market tc=1 elsif CS and close>MA then sellshort 1 contract at market tc=1 endif set target pprofit box*1.618 endif if longonmarket then sell at RangeBottom stop elsif shortonmarket then exitshort at RangeTop stop endif |