Forum

Occasional Error 4109 with OrderSend()

Hi there, I have occasional failure of OrderSend() on Error4109 with “Allow Live Trading” checked . It does not happen all the time. I also noticed that the same trade may go through in a different account at the same time. My EA is fully self contained and does not depend on any external inputs

Limiting the opening of multiple orders on new bar

Hi there, I have written an EA which I run on several charts simultaneously. In order to keep the margin usage within a reasonable level, I want to prevent having more than 5 orders open at a given time. I use an order counter and compare its result with the value of OrdersTotal() before allowing a

MQL4 Formula Interpretation

Hi there, if(Close[1]>Open[1]&& Close[2]<Open[2]&& MathAbs(Open[1]-Close[1])>MathAbs(Open[2]-close[2]&&Close[1]>Open[2]))BullishEngulfing = true; else if (Close[1]<Open[1]&& Close[2]>Open[2]&& MathAbs(Open[1]-Close[1])>MathAbs(Open[2]-Close[2]&&Close[1]<Open[2]))BearishEngulfing = true; I wrote