
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Good day to all good people ...
Below is the code of Trailing Stop function, who can explain the meaning ofOrderStopLoss()!=0 highlighted in the code, why it is applicable, in this case, only forOrderType()==1. ..?
...And another, more important question - how to write in this code the condition according to which only one of several open market orders meeting StopLoss requirements will be triggered? I.e., if we have two or more open orders of the same direction, only the order closest to the market price will be modified.
... thanks in advance to all who responded for any answer !!!
Let's take a piece of code and read it:
If StopLoss is zero, that is, it simply does not exist:TralPrice>=NormalizeDouble(OrderStopLoss(),Digits), in this case, the value ofTralPrice will always be greater, and it is incorrect to compare it to something, that is why we enteredOrderStopLoss()!=0 this says that if there is a StopLoss, then .
Now take apart the piece with bai and see why there is no check for stoploss.
We take a piece of code and read it:
If StopLoss is zero, that is, it simply does not exist:TralPrice>=NormalizeDouble(OrderStopLoss(),Digits), in this case, the value ofTralPrice will always be higher, and it is incorrect to compare it with something, that is whyOrderStopLoss()!=0 is introduced, it says that if there is a StopLoss, then...
Now parse the bai piece and see why there is no check for stoploss.
Hello ... thanks for the reply ... "If stoploss is zero ... in that case the value ofTralPrice will always be greater" - let me disagree with you, it will not always be greater,TralPrice may be equal toStopLoss priceat the time of first placing ... but before that it will be higher, I agree.
...if(OrderType()==1&& TralPrice>=NormalizeDouble(OrderStopLoss(),Digits) &&OrderStopLoss()!=0)return(0); // this is a negation condition, prohibiting order modification, and composite ...
... ifTralPrice>OrderStopLoss(), orTralPrice=OrderStopLoss(), andOrderStopLoss()!=0,StopLoss already exists - thenreturn(0), no modification of the order ...
... and ifStopLossdoes not exist, it has not been set yet, then what ? then it turns out that even thoughTralPrice>OrderStopLoss() ... is that how it works ... or am I wrong ?
I saved in csv format, that didn't work
people, can you please tell me how to make the graphs in the terminal to save the markup after switching on again?
I saved in csv format, that didn't work
... and if you save it as a template, it doesn't work?
comment no 666 :D
I don't think so, templates are different.
comment no 666 :D
save/load template, profile
try
save/load template, profile
try
Because on various forums they write that the new build shows n/a and it is not worth bothering
Such a question.
Is there an android version for tablets with mql4?
Or only for win on desktop computers?