Move PT ERROR 130

2 replies

NatLua

Customer, bbp_participant, community, 6 replies.

Visit profile

7 years ago #115540

There seems to be a bug when moving the PT of an open order.

 

variable used:  AverageTPInCurrency (double)

 

ex:  AverageTPInCurrency = 1.0925

 

When I open a market order and set the TP with the variable AverageTPInCurrency, everything goes well. (TP = 1.0925)

 

When I move the PT of an open order, i get error 130 in MT4 (TP = 0.00010925)

 

     Move PT To: 

          Magic Number: 11111

          Price:  AverageTPInCurrency

 

 

Upon checking the code:

     sqMovePTTo(11111, (AverageTPInCurrency * getPointCoef(11111)));

 

11111 is the magic number.

It seems the problem appears because the function getPointCoef is inserted into the code.

 

Please confirm if this is really a bug.  

 

I do not want to manually remove the function getPointCoef from the source code everytime I make a change to the rules.

0

NatLua

Customer, bbp_participant, community, 6 replies.

Visit profile

7 years ago #139312

I’ve managed to find a workaround.

 

Move PT To:

     Magic Number: 11111

     Price: ConvertToRealPips(ConvertToPips(AverageTPInCurrency)) + 0 * 0

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #139323

Hello,

 

yes, another solution for you could be this https://strategyquant.com/forum/topic/4622-trail-the-stop-with-conditions/

0

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