Forum

How can i Know the minimum Balance needed for EA to run smoothly without MarginCall ?

Hello I am new to developing EAs I am developing an EA that Has Sort of Martingale in it so sometimes it goes to high drawdowns in equity but most of the times eventually close in profit after looking at the test report i cannot figure what is the minimum balance needed for the ea to run smoothly

Open Opposite Order immediately after Stop Loss hit

Hello I need to Open a new Opposite order immediately after stop loss hit if i have a buy order and the Stop loss hit immediately open a sell order with a stop loss at the open price of the previous order and a take profit target 2 times the SL and if i have a sell order and the stop loss hit

if i changed the spread in the backtest i get a lot of error 138 why?

Hello at first i back tested my ea with spread of 3 as it the average of my broker for usdjpy without any error but if i tried 0 or 6 or 7 almost half of the trade won't be triggered because of error 138 , is there any solution to that, will that affect live or demo trading

iMaOnArray and iVolume

i am making an ea that send orders if the volume is above the 21 moving average of the volume buy when i put my conditions for the order and test nothing happen , 0 trades taken what is wrong with my code? double vol[ 21 ]; for ( int i= 0 ;i< 21 ;i++) vol[i]= iVolume ( NULL , 0 ,i);

if i have many open orders, how to get the last order opened open price?

Hello fellow traders, I am developing an ea that opens a lot of orders but only open buy order if their is a buy order opened already what i want is the next order to open it has to be at price above the last opened price if that makes sense. and vice versa for sell that's a code i tried but it

How To Close All Open Orders at the touch of the MA Not after the candle close?

Hello Fellow Traders, It's have been a week since i started learning how to program MQL4 And i Have A problem , The EA I am working on opens a lot of orders and i want all these orders to be closed at the touch of the ma let's say i have opened 7 buy orders above 21 MA and i want to close them if