Ored Modify Starts as soon as a second currency is added - page 3

 
barnacle7:

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.

Reason: