Hi Radoslav and fellow traders,
I am trying to create an EA that will trade the DAX (ger30) and it seems some brokers provide a data feed where price moves by 0.5 point increments. I am having trouble finding out how to have the EA avoid other decimal numbers than .0 and .5 for entry, sl and tp.
So for example, the DAX is trading at 11408.5 now. The next tick to the upside with some brokers would be 11409.0 (skipping .6, .7, .8 and .9) so if one would try to place a pending order or order a TP or SL at any price that uses a different decimal than .0 or .5, the server will return error 130 and/or returns an error saying something like like "[Invalid S/L or T/P]".
I have thought about manually modifying the NormalizeDouble value(s) to "0" in the code if there is no other option, but I have trouble to find the right NormalizeDouble lines to do that with and this would also mean .5 levels will never be used.
If I am missing something or if any sollution comes to mind, I would appreciate the help.
Thanks very much in advance for your reply!
Best regards,
Saf