zero divide error
Maybe NumberOfOrders returns zero?
No not NumberOfOrders.
It was TICKVALUE got it sorted now anyway, Thanks
Speaking from a programming side of things (not MQL, but I have an Associates Degree in computers), a zero error is a pain in the ass. The best way to resolve it, if it pops up, is to test for the possibility of the item you are dividing for being a zero, usually with an if/else type of statement, like the following
If variable==0
{
do this code
}
else
{
do this code
}
Hello.
Can anyone shed some light on this?
I`m geting zero divide error when my EA calculates lot size. It only happens in Strategy tester on EURUSD and USDJPY when testing in tick mode ( control points works fine)
This is the code I use:
Also tried this and get the same result
Looks to me that for some reason Point and MODE_TICKVALUE return 0 values?
Any help much appreciated.
Thanks
Ivo