Reply

Invalid price for Indices

7 replies

kapitalgo

Customer, bbp_participant, community, 26 replies.

Visit profile

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

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

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 …

0

kapitalgo

Customer, bbp_participant, community, 26 replies.

Visit profile

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

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #139831

Hello,

 

understand, can you share your strategy and more details? You can send it to [email protected]

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

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

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

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

0

Joczek

Subscriber, bbp_participant, community, 1 replies.

Visit profile

7 years ago #141718

I have the same problem with Activtrades broker:

2017.02.16 15:59:45.672 ‘308369’: modification of pending order #319313785 buy stop 0.01 Ger30Mar17 at 11845.0 sl: 0.0 tp: 0.0 -> price: 11845.0 sl: 11788.9 tp: 0.0 failed [Invalid S/L or T/P]

0

kapitalgo

Customer, bbp_participant, community, 26 replies.

Visit profile

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?

0

Viewing 7 replies - 1 through 7 (of 7 total)