Funyoo,
I hope you are still reading this thread....I have a MQL4 question to ask. I am trying to understand the reason behind the "OrderSend error 4107 problem I keep having with back tests on FXDD platform:
2009.05.22 10:00 vForce Like EA v1.1 EURUSD,M15: OrderSend error 4107
2009.05.22 10:00 vForce Like EA v1.1 EURUSD,M15: invalid price
1.39803000 for OrderSend function
If you notice, the price value (1.39803000) is not valid; it appears to have too many decimal places. FXDD (and other brokers I'm sure) list the price for the EURUSD like this: 1.4170 I believe this is the source of the OrderSend error problem.
So, to try to correct is, I'm trying to understand the code that is used to generate the buy and sell orders in Vforce Like EA v1.1:
Code:
Ticket1=OrderSend(Symbol(),OP_BUYSTOP,ILots1,High[i]+MarginPips*Point,Slippage,SL,TP,EAName,Magic1,Expire,Blue);
Ticket2=OrderSend(Symbol(),OP_BUYSTOP,ILots2,High[i]+MarginPips*Point,Slippage,SL,0,EAName,Magic2,Expire,Blue);
Can you explain to me this function or point me to where I can get more information? I believe there needs to be a rounding function for this section of code:
Code:
High[i]+MarginPips*Point
Is this correct, or am I looking in the wrong place?
btw, I see this problem show up for all versions of VForce Like EA at different TF, so it's a universal problem.