Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1753
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
Please help with this question.
hard to guess what your code means, but 5 points is 5 *_Point
it's hard to guess what your code means, but 5 pips is 5 *_Point
is the opening price of a stop set. The same code is used for buy and stop orders.
Nothing has changed with "_Point". If Ask is replaced with MODE_STOPLEVEL and the 5 pips indentation is removed, the pending orders of all symbols open lower (or higher in case of a buy stop) by an additional ~20 pips.
The same code is also used for buy and stop orders.
Nothing has changed with "_Point". If Ask is replaced with MODE_STOPLEVEL and the 5 pips indentation is removed, the pending orders of all symbols open lower (or higher if the buy stop) by an additional ~20 pips.
pending orders, on five-digit orders everything works as intended, on three-digit pending orders open 150 pips lower.
What is Adk? This is price, right now USDJPY is 115.080, if you add 5 to this value you get 115.085 and then multiply it by 0.001, you get... three guesses ...
And on five digits, too, it works through ... this very spot. Only you don't see it, or you just don't want to see it...
Put MODE_STOPLEVEL .
Forum on trading, automated trading systems & strategy testing
Any questions from newbies on MQL4 and MQL5, tips and discussion on algorithms and codes
Alexey Viktorov, 2021.11.23 07:37
What is Adk? This price is USDJPY 115.080, if you add 5 to this value you get 115.085 and then multiply by 0.001, you get... three guesses...
And on five digits, too, it works through ... this very spot. Only you don't see it, or you just don't want to see it...
exactly 14 pips for three and five digits
Well, yes. I am not without sin. The main thing is that you have understood your mistake and everything went right.
But still it is correct (Ask + 5*Point) or (Bid - 5*Point)
Yeah, well, I'm not without sin. The main thing is that you understood your mistake and everything went right.
But still it is correct (Ask + 5*Point) or (Bid - 5*Point)
In this case, for a SellStop:
Buy Stop:
NormalizeDouble(previous_bar.high + ((Ask - Bid) + order_indent*Point), Digits)
For a Sell Stop, we don't need to consider Ask in order to place the order but for a Buy Stop we have to make a difference (Ask-bid) otherwise (Ask + 5*Point), we will add Ask + Points to the price of the previous bar and the order will open at 150 points higher.
Well, then, for a Sell-Stop:
Buy Stop:
NormalizeDouble(previous_bar.high + ((Ask - Bid) + order_indent*Point), Digits)
For a Sell Stop, we don't need to consider Ask in order to place the order but we have to make a difference for a Buy Stop (Ask-bid) otherwise (Ask + 5*Point), we will add Ask + Points to the price of the previous bar and the order will open at 150 points higher.
This is an idea of your own taste. You should do it the way you like.