I need EA that depends on a custom indicator This is the idea. Say we have a signal (can be buy or sell signal) on a candle, I want the low and high of the signal candle to act has support and resistance for other candles till another signal comes out. If a new signal comes out, then the support and resistance will change to the low and high of the new candle that has the new signal. I want buy trade to be placed when price hits 5 pips (pips deviation should be opened in input) above the resistance and sell trade to trigger if price hits 5pips below the support. For example If a buy trade is placed when price hits 5pips above resistance, stop loss will be 5pips below the support. As the buy position is hitting stop loss, reverse trade (sell trade in this case) should be placed. Reverse trade may not be placed as trade is hitting stop loss if the support and resistance has changed (a new signal has come out, thus changing support and resistance level). Take profit should be x2 of the stop loss (reward is x2 of the risk) (leave take profit opened as well in input). Incase of losing trade, reverse trade should be based on martingale. You can set default martingale to x2 (it should be opened in input as well). Martingale stops once we have a winning trade. Stop loss, take profit, martingale, deviation above resistance and support and other important conditions (maybe trailing stop) should be opened in input.