Specifiche
Hello I have my EA on MQL4 that works, but I'm looking for someone who could perfect it. Indeed I would like that according to certain parameters, it trades only once!
double ma1_m240 = iMA(NULL, 240, 1, 0, MODE_EMA, PRICE_CLOSE, 0);
double sar_m15 = iSAR(NULL, 15, 0.02, 0.2, 0);
double sar_m30 = iSAR(NULL, 30, 0.02, 0.2, 0);
double VAR_ONE = ma1_m240 ;
double VAR_TWO = sar_m15 ;
double VAR_THREE = sar_m30 ;
double ma_vps_xx0 = iMA(NULL, 5, 5, 0, MODE_EMA, PRICE_CLOSE, 0);
double ea_profit = OrderProfit() ;
//**************** THIS IS WHAT I WANT ********************
if ( ma_vps_xx0 > VAR_ONE ) è open and order Buy
if ea_profit >= 1 and ma_vps_xx0 < VAR_TWO è Close the order AND DON’T OPEN ANOTHER ONE
if ( ma_vps_xx0 > VAR_ONE && ma_vps_xx0 > VAR_TWO ) è open and order Buy
if ea_profit >= 2 and ma_vps_xx0 < VAR_THREE è Close the order AND DON’T OPEN ANOTHER ONE
if ( ma_vps_xx0 > VAR_ONE && ma_vps_xx0 > VAR_TWO && ma_vps_xx0 > VAR_THREE ) è open and order Buy
if ea_profit >= 5 è Close the order AND DON’T OPEN ANOTHER ONE
if ( ma_vps_xx0 < VAR_ONE ) è Sell
if ea_profit > = 1 and ma_vps_xx0 > VAR_TWO è Close the order AND DON’T OPEN ANOTHER ONE
if ( ma_vps_xx0 < VAR_ONE && ma_vps_xx0 < VAR_TWO ) è open and order Sell
if ea_profit >= 1 and ma_vps_xx0 > VAR_THREE è Close the order AND DON’T OPEN ANOTHER ONE
if ( ma_vps_xx0 < VAR_ONE && ma_vps_xx0 < VAR_TWO && ma_vps_xx0 < VAR_THREE ) è open and order Sell
if ea_profit >= 5 è Close the order AND DON’T OPEN ANOTHER ONE
//************************* END *******************