Hi, I have got some problems with introduce my conditions in reality. If any good person coul help me a little bit, I would be very gratefull.
How to convert these conditions below to code?
For example every candle is 1H candle->
-positions can be opened from e.g. 08:00:00 to 21:59:59
And
-body of candle #1 and candle #2 shoul have minimum e.g. 5 pips
And
-if at the actual moment there is no opened a position, then it can be opened only one position, becouse if one position is opened, second position can't be opened
And
-if position was opened in any candle and if this position will not close with TP or SL, then this position has to be closed at the end of this candle (close price this candle)
And
- if the one position was opened and closed in the same candle( 1H candle), then next position can't be opened in the same candle
Thank you for any information.
- anyone can help me with the logic?
- Question for connoisseurs
- coding problem

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register