How to open next order after 5 bars if there is already open order and conditions are met, so there won't be a lot of open trades???
-
Open next order after 5 bars if there is already open order and conditions are met, so there won't lot of open trades.
-
- Make variable barcount
- On every bar, barcount = barcount+1
- Condition before order: barcount > 5
- After order: set barcount = 0
-
Well, if the reason is to not open lot of trades, the easiest way is to have "Once per bar" somewhere above the Buy/Sell block. You can set different timeframe in this block.
Another way is to have "For each Trade" (or Closed Trade, it depends) with "not more than..." set to 1, so only the last trade is loaded, and then "check age" and then the Buy/Sell block.
-
@fxdreema I tried Once per bar in 5m Timeframe but it still sometimes opens 5 trades in 1 minute when the crossover happens in 1 minute chart.
-
@roar Please if you can help me how to create the variable, i'll try the condition by myself barcount>5. and how to reset to 0.
Please can you send me an example?
-
Sure, here's how to create the variable and how the logic goes.
https://fxdreema.com/shared/5XfmFTFbb


-

What is wrong in here? since i put this on the project no trades are opened on backtest
-
-
