Invalid price for Indices
7 replies
kapitalgo
7 years ago #115675
Good afternoon everybody,
i got a problem with invalid prices on indices, i know what’s going wrong, but i didn’t know how to correct this, although i’m familiar with mql4. I didn’t find anything about this in the mql4.com forum. Following:
The price has two digits, but moves in 0.50 steps, for example:
12345.00
12345.50
12346.00
12346.50
and so on…
The EA will open a buy stop at 12345.33, but it doesn’t work. I thought about to use MathRound() but it’s really complicated, the EA must round x.25 up to x.50, x.24 down to x.00 and x.75 up to x.00, x.74 down to 0.50.
Has somebody an other solution for this? Same for SL and TP
Thank you very much and best regards,
Patrick
tomas262
7 years ago #139802
Hello,
do you mean how to do that in EA Wizard? I am asking because you placed your question into the StrategyQuant3 forum section …
kapitalgo
7 years ago #139806
Good morning tomas262,
it’s a generated SQ strategy. I normalizedDouble the trailing stops and set the Digits to 0, so it worked for the moment, but it jumps over the half point.
Best regards, Patrick
tomas262
7 years ago #139831
Hello,
understand, can you share your strategy and more details? You can send it to [email protected]
Mark Fric
7 years ago #141574
thank you for pointing to this error, I have to investigate it. There is NormalizeDouble method used to “fix” the SL/PT value and it should take care also about this.
But I have to check if it does.
We’ll probably release a quick fix of SQ somewhere in the next week.
Mark
StrategyQuant architect
Mark Fric
7 years ago #141715
I looked at it, but MT4 allows you to place Stop or Limit price at the fractions of the actual prices, for example when price moves in .050 steps, you can still place stop or limit order at 12345.33 and it will be filled at the nearest “correct” price.
Doesn’t it work the same with your broker? If not, can you tell me which broker and symbol is it?
Mark
StrategyQuant architect
Joczek
7 years ago #141718
I have the same problem with Activtrades broker:
kapitalgo
7 years ago #142007
I use IG as broker, not sure but i think i’ve tried it with FX-Choice too. Possible MT4 update?
Viewing 7 replies - 1 through 7 (of 7 total)