Sorry for the noob question, but all along i thought the orderprofit() function would be smart enough to give true pip value, but it doesnt seem so.
Im testing on 4 digit broker Fxpro, and the profit of 30 pips is returning as 300 via OrderProfit(). How can i fix this ?
thx
I encountered this problem today, and it's really anoying....
From the documentation of OrderSelect(), it says:
To find outfrom what list the order has been selected, its close time must be analyzed.
If the order close time equals to 0, the order is open or pending and taken from the terminal open orders list.
So it's crucial that OrderCloseTime() should be tested --- not OrderClosePrice()!
This issue wasted me several hours... from morning till mid night... Glad I figured it out.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
return(DeltaValuePerLot() * pips2dbl);where the pips2dbl get value?..
Thank you brother @WHRoeder..
Sorry for the noob question, but all along i thought the orderprofit() function would be smart enough to give true pip value, but it doesnt seem so.
Im testing on 4 digit broker Fxpro, and the profit of 30 pips is returning as 300 via OrderProfit(). How can i fix this ?
thx
I encountered this problem today, and it's really anoying....
From the documentation of OrderSelect(), it says:
So it's crucial that OrderCloseTime() should be tested --- not OrderClosePrice()!
This issue wasted me several hours... from morning till mid night... Glad I figured it out.