Thanks Raptoruk, I now realise the importance of the parenthesis to keep things in the loop. I was suprised that there was no return; , After alert .. , Well , I'll add it to my list of things I need to learn more about.
If I didn't have a magic number is it better to use Continue; to stop it flowing to the next code if the Symbol() doesn't Equate to Ordersymbol() ? Using or not using continue; is there anything important to consider when deciding ?
I looked at the "can price!= price?" , The issues you are refering to would that be for "Orderopen price , Orderstoploss ,Bid and Ask as they are of "Double type" ?
My understanding is Never compare double type for equality and that there may be slippage due to the rounding (Early/Late Entry/Exit or Alert on an indicator ? Are these the main issues ?
If you return once you have processed an order then you will have to wait for the next tick to process a 2nd order if there is one and a third tick to process a third order of there is one, etc.
If the Symbol doesn't match the Order won't be modified. There is no need for a continue.
It's not just about comparing doubles for equality, but also checking if one double is greater or less than another, the way doubles work you can get false results in some circumstances, in the thread there are some suggested ways of addressing this issue.
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.
Thanks Raptoruk, I now realise the importance of the parenthesis to keep things in the loop. I was suprised that there was no return; , After alert .. , Well , I'll add it to my list of things I need to learn more about.
If I didn't have a magic number is it better to use Continue; to stop it flowing to the next code if the Symbol() doesn't Equate to Ordersymbol() ? Using or not using continue; is there anything important to consider when deciding ?
I looked at the "can price!= price?" , The issues you are refering to would that be for "Orderopen price , Orderstoploss ,Bid and Ask as they are of "Double type" ?
My understanding is Never compare double type for equality and that there may be slippage due to the rounding (Early/Late Entry/Exit or Alert on an indicator ? Are these the main issues ?
If you return once you have processed an order then you will have to wait for the next tick to process a 2nd order if there is one and a third tick to process a third order of there is one, etc.
If the Symbol doesn't match the Order won't be modified. There is no need for a continue.
It's not just about comparing doubles for equality, but also checking if one double is greater or less than another, the way doubles work you can get false results in some circumstances, in the thread there are some suggested ways of addressing this issue.