Forums › ProRealTime English forum › ProOrder support › sell same bar close › Reply To: sell same bar close
01/03/2019 at 1:44 PM
#87943
Mean reverting strategy?
Here is the code built with MTF capability (you’ll not able to use it until the public release of it)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
defparam cumulateorders=false TIMEFRAME (daily,updateonclose) close30=close[30] close9=close[9] TIMEFRAME (5 minute,updateonclose) condition = close>close30 and close<close9 and time=090000 if not onmarket and condition then buy at market endif if longonmarket and time=172500 then sell at market endif graph close30 graph close9 coloured(200,0,0) graph close //graph condition |