barindex problems, strategy starting trade from the first candle?
Forums › ProRealTime English forum › ProOrder support › barindex problems, strategy starting trade from the first candle?
- This topic has 6 replies, 3 voices, and was last updated 5 years ago by Nicolas.
Tagged: preloadbars
Viewing 7 posts - 1 through 7 (of 7 total)
-
-
01/26/2019 at 9:09 AM #89674
why I set the system to start trading if barindex > 100 but it keeps starting trade from the first candle???
where’s the problem??
1234567891011121314151617181920212223DEFPARAM CumulateOrders = FalseRSII = RSI[5](close)MA = Average[100](close)//longlong = (BarIndex > 100 and RSII <= 30 and close > MA)short = (BarIndex > 100 and RSII >= 70 and close < MA)if long thenbuy 1 contracts at marketendif//shortif short thensellshort 1 contracts at marketendif//exitSET STOP PTRAILING 5001/26/2019 at 10:25 AM #8967701/26/2019 at 11:33 AM #89679Couldn’t resist a tweak … tried a few and ended up at below to keep it simple.
Results attached with spread = 4.
Need to do some Walk Forward testing, but I’m setting it going on Demo Forward Test as is anyway.
1234567891011121314151617181920//https://www.prorealcode.com/topic/barindex-problems/DEFPARAM CumulateOrders = FalseRSII = RSI[8](close)MA = Average[90](close)//longlong = (RSII <= 30 and close > MA)short = (RSII >= 70 and close < MA)if long thenbuy 1 contracts at marketSET STOP PLOSS 250endif//shortif short thensellshort 1 contracts at marketSET STOP PLOSS 250endif02/02/2019 at 5:52 PM #9032102/02/2019 at 6:04 PM #9032202/02/2019 at 6:09 PM #9032302/02/2019 at 6:16 PM #90324 -
AuthorPosts
Viewing 7 posts - 1 through 7 (of 7 total)
Find exclusive trading pro-tools on
Similar topics: