EA MQL5 BB and RSI I will need mq5 file source code INPUTS Magic Number slippage=10 TP=100 --SL_in_pips ON/OFF //SL based on pips or hours SL_pips=100 0 //stop loss =100 pips SL_hours=48 //stop loss 48h after open position lotsize fixed or dynamic lotsize_dynamic = 1000 //balance/1000 Lotsize_fixed =0.1 --Grid On/OFF 2position_distance=100 //open 2 position after 100 pips from 1 position 2position_lot=2 // 2xlot size 2position_close=20 //close pos. 1 and 2 if retracement between open pos. 1 and 2 is 20% 3position_distance=200 //open 3 position after 200 pips from 1 position 3position_lot=4 // 3xlot size 3position_close=20 //close pos. 1,2,3 if retracement between open pos. 1 and 3 is 20% 4position_distance=300 //open 4 position after 300 pips from 1 position 4position_lot=8 // 4xlot size 4position_close=20 //close pos. 1,2,3,4 if retracement between open pos. 1 and 4 is 20% 5position_distance=400 //open 5 position after 400 pips from 1 position 5position_lot=16 // 5xlot size 5position_close=20 //close pos. 1,2,3,4,5 if retracement between open pos. 1 and 5 is 20% 6position_distance=400 //open 6 position after 500 pips from 1 position 6position_lot=16 // 6xlot size 6position_close=20 //close pos. 1,2,3,4,5,6 if retracement between open pos. 1 and 6 is 20% BB=20 BB deviation=2 RSI=14 RSI_min=20 RSI_max=80 distance=8 //minimum distance in candles between signals --------------------------------------------- entry if conditions are fulfilled after candle close (refresh every candle) buy position if RSIRSI_max && close>BB_upper_band MM ----BUY OPEN if buy signal and sell position is already open - open buy position if buy signal, but already >1 buy position is open - do nothing if buy signal - open buy position if 1 position buy is already open, open next buy position after 2position_distance with 2position_lot if 2 position buy is already open, open next buy position after 3position_distance with 3position_lot if 3 position buy is already open, open next buy position after 4position_distance with 4position_lot if 4 position buy is already open, open next buy position after 5position_distance with 5position_lot ----BUY CLOSE (retracement depends of amount of open positions) retracement = 1 buy position open price-(((1 buy position open price-2 buy position open price)*2position_close)/100) if 2 positions buy are open && Price_High candle1 >=retracement Close all buy position retracement = 1 buy position open price-(((1 buy position open price-3 position open price)*3position_close)/100) if 3 positions buy are open && Price_High candle1 >=retracement Close all buy position retracement = 1 buy position open price-(((1 buy position open price-4 position open price)*4position_close)/100) if 4 positions buy are open && Price_High candle1 >=retracement Close all buy position retracement = 1 buy position open price-(((1 buy position open price-5 position open price)*5position_close)/100) if 5 positions buy are open && Price_High candle1 >=retracement Close all buy position retracement = 1 buy position open price-(((1 buy position open price-6 position open price)*6position_close)/100) if 6 positions buy are open && Price_High candle1 >=retracement Close all buy position ----SELL OPEN if sell signal and buy position is already open - open sell position if sell signal, but already >1 sell position is open - do nothing if sell signal - open sell position if 1 position sell is open, open next sell position after 2position_distance with 2position_lot if 2 position sell is open, open next sell position after 3position_distance with 3position_lot if 3 position sell is open, open next sell position after 4position_distance with 4position_lot if 4 position sell is open, open next sell position after 5position_distance with 5position_lot ----SELL CLOSE (retracement depends of amount of open positions) retracement = 2 sell position open price-(((2 sell position open price-1 sell position open price)*2position_close)/100) if 2 positions are open && Price_Low candle1 <=retracement Close all sell position retracement = 3 sell position open price-(((3 sell position open price-1 sell position open price)*3position_close)/100) if 3 positions are open && Price_Low candle1 <=retracement Close all sell position retracement = 4 sell position open price-(((4 sell position open price-1 sell position open price)*4position_close)/100) if 4 positions are open && Price_Low candle1 <=retracement Close all sell position retracement = 5 sell position open price-(((5 sell position open price-1 sell position open price)*5position_close)/100) if 5 positions are open && Price_Low candle1 <=retracement Close all sell position retracement = 6 sell position open price-(((6 sell position open price-1 sell position open price)*6position_close)/100) if 6 positions are open && Price_Low candle1 <=retracement Close all sell position