Forum

Convert MQL5 To MQL4

I have this MQL5 EA that I would like to convert into an MQL4 EA. I tried to convert it on my own but can not get it to react the way it does on an MQL5 account. The Broker that I want to use has only MT4. Please help or tell me who would be able to convert it for me

Strategy tester

I am not new to forex but I am into Expert advisors and have been testing them for a while now. I decided to change brokers and the one I picked has everything I am looking for in a broker. But when I back test my EA on a hourly chart for a weeks time I get the whole weeks worth of data. But when I

Help with EA coding

I have coded this EA with a Trailing Stop and I Trailing Take Profit . I would like the Trailing to trail every time it moves so that the stop will move every time a tick moves in the direction of the stop. So if the stop is at 20 pips and moves 1 pip in the direction then back again 1 pip the Stop

tickCurrent > tickPrevious

I am trying to create an EA that opens a buy order when the price moves up one tick and a sell order when the price moves one tick down. double tickCurrent; double tickPrevious = tickCurrent; tickCurrent = Bid; if (tickCurrent > tickPrevious) This is what I have but it doesn't work

Hold expert advisor

I wrote this expert advisor for a 1H chart the only problem I have is once the veriable, if(iStochastic(Symbol(),Period(),21,3,3, 0,1,0,0)>=uplimit21) if(iStochastic(Symbol(),Period(),9,3,3, 0,1,0,0)<=downlimit9) is hit and an order is opened and closed if the veriable is still there when the order

Sleep function not working

I am trying to write a simple alarm for when an order is closed this is what I have but I can't get it to sleep. The alarm sounds evey tick and I want it to sound only once after the ordes are closed. int start() { if(OrdersTotal()==0)Alert("Orders Closed!!!"); Sleep(600000); }