Open trade on candle open and close trade on candle close
-
Hi guys.
I want to do a set up, pretty straight forward, but still i tried and failed. I guess I'm not a smart man.

Hope someone could help me with it or at least guide me in the right direction.
The set up:
EA will open a trade on the open of a candle (H1, H4, D1). There will be a pre-setup option to place lot size, stop loss, take profit and trailing stop. EA will close this trade on the close of the same candle, or during the last 1 minute before same candle close. EA will run continuously for every candle.Function:
- Open a Buy/Sell trade on candle open (one trade per candle)
- Close trade on the close of the same candle. Or within the last 1 minute before candle close.
- Time frame = current
- Lot size = input
- Stop loss = input
- Take profit = input
- Trailing stop = input
Hope someone will be kind enough to help me with this.

Thanks in advance!
-
Here I wrote about the "close of the same candle" problem - https://fxdreema.com/help/-/working%20w ... e%20closes
In short... don't even try it
-
Thank you.
This system you designed is great. Keep up the good work!
-
the block "once per bar", closes trades at the close of the current candle, irrespective of time, just as soon as the candle is over, your trade would be closed