Reply

[BUG] Sometimes ATR based SL/TP wont set by the EA and stays as 0.00000

3 replies

Karish

Customer, bbp_participant, community, sq-ultimate, 444 replies.

Visit profile

6 years ago #201142

Recently i discovered by my research that there are some EAs with ATR based SL or TP that are working perfectly but sometimes the target that based on an ATR like SL or TP or even both of them will not Modify correctly when the order executed,

PLUS i havent tested this one but i think it is also effected by this bug: maybe the TrailingStop/BreakEven/etc that are based on ATR are also bugged..

 

the problem seems to be the calculation of the ATR formula with the target, but i cannot find exact code rows to fix it,

 

this is a critical bug, some orders are been placed without SL or TP or even both!,

i will ditch the ATR as my SL/TP for now till we can solve it somehow..,

would be great if someone from the DEV team will help with that, it is a small problem that should be fixed,

thank you for your time and attention.

0

Karish

Customer, bbp_participant, community, sq-ultimate, 444 replies.

Visit profile

6 years ago #201150

thank you @notch, but can you be more specific?,

could you post the exact code that solves this problem for you?,

and does it solve it completely  or like you said:

“under some circumstances (depending on the TS etc formula) subsequent modifications could lead to the SL being modified some 10 greater than the initial SL, the SL being deleted completely etc.”

 

would the problem be solved in 100%?, thank you please post the full code that you modified in order to understand what have been changed, thanks again for your time.

0

Karish

Customer, bbp_participant, community, sq-ultimate, 444 replies.

Visit profile

6 years ago #201155

@notch Thank you my friend,

i have modified the code,

i will try out and see if the problem fixed,

though the problem was only when the EA was opening and then modifying it to the correct SL/TP because under ECN brokers you have to set SL/TP targets after sending the order it self and not in the same “OrderSend” function,

so my problem was that when the EA makes that first modification of the order that was just opened then sometimes the SL/TP

is set to 0.0000 and not the right SL/TP target, it should be something with the calculation of it (“NormalizeDouble” etc…)

 

however i did modify my code, thank you very much for your time, ill see if it solved the problem

this is the code that you should replace in MT4Functions.inc

https://paste.ofcode.org/vhghvwJcihdpn5xupD8Wi5

0

Karish

Customer, bbp_participant, community, sq-ultimate, 444 replies.

Visit profile

6 years ago #201165

not at all, just swings, the log wont show any errors, it seems to be some kind of a calculation problem “NormalizeDouble” or something… never-mind i just turned off ATR as SL/TP and other  Price Rangers from the building blocks, very bugged,

i’ve been backtesting like 70 different EAs today and trying to match SQ’s equity curve with MT4’s equity curve, turns out that i have turned off ATR as SL/TP and other  Price Rangers from the building blocks as the results does not match with them on by my research, ohhh i cant wait till SQ4 atlest Beta7 😉

0

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