Open position above or below the previous position.
-
Taking this opportunity, since it is my question, how do I open a new position always up or always below the previous position?
For example. I opened a position on EURUSD at 1.11160. I need to buy the next position is open above 1.11160. He opened a buy position at 1.11200. Now the next buy position can only be opened only above 1.11200.
Vice versa to Sell.
-
if you will compare only last opened buy or last opened sell prices, you can open prices save into variables, like:
variable_open_sell
variable_open_buy
and before/after opened position you save bid/ask price into these variables - but dont forget, that variables are deleted after restart EA into new chart
you can than before opening new trade compare variables with bid/ask prices if is more or less depended on how you will open ...
there are even other/better solutions - with checking prices from opened positions
-