BUY WHEN THE CANDLE IS HIGHER SELL WHEN THE CANDLE IS LOWER
-
Hello!
How do I create this strategy.BUY
When the body of candle 1 is higher than the body of candle 2, open a position
Place a stop loss below the low of candle 1
if the trend continues, always move the stop loss for the previous low candle.SELL
When the body of candle 1 is lower than the body of candle 2, open a position
Place a stop loss on the high of candles 1
if the trend continues, always move the stop loss to the high of the previous candle.Only open one trade if the condition is met
Look at the picture

-
The problem there is how you define 'if trend continues'. You need to tell the EA precise conditions for it to understand that is happening. How would you define them?
-
When the position is open in this case BUY and the trend goes in the right direction, the next candle is bigger (the price is higher) than the previous one, the position is still open, and the stop loss is automatically moved under the previous candle to WICK LOW, and so on until the price set STOPLOSS
When the position is open in this case SELL and the trend goes in the right direction, the next candle is smaller (the price is lower) than the previous one, the position is still open, and the stop loss is automatically moved above the previous candle to WICK HIGH, and so on until the price set STOPLOSS
-
If you are just using 2 candles as your trend this is easy to achieve, set up a start just placing trades, ID2=bull, ID1=bull, place a trade using ID1, ID1 is > ID2, opposite for sells, once working you can work on modifying the stop.
-
How do I now add that the stop loss always moves at:
BUY always move the stop loss below the candle wick LOWEST.SELL always move stop loss above candle wick HIGHEST.
Candle after actual candle.The STOP LOSS movement is repeated until the position is closed with a STOP LOSS.