Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 253

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
Can you tell me why the trawl is triggered on every tick?
We have to compare TakeProfit and StopLoss of BUY position with Bid price and SELL position with Ask price.
It's the price at which they are triggered.
So try it like this:Can you tell me why the trawl is triggered on every tick?
Trawl template. Right in the same branch.
It is necessary to compare TakeProfit and StopLoss of a BUY position with the Bid price and SELL position with the Ask price.
These are the prices at which they are triggered.
In other words, try this:Nothing has changed.
Trawl template. Right in the same thread.
Thank you.
Trail template. Right in the same branch.
double sl=NormalizeDouble(level_of_trail-trailing_stop*point,digits);// calculate new stoploss level by value,
Why do you havepoint anddigits written with a small letter ?
double sl=NormalizeDouble(level_of_trail-trailing_stop*point,digits);// calculate new stoploss level by value,
Why do you havepoint anddigits written with a small letter?
Because the code is optimized, the variable is initialized once in the template, not 100 times in each place
double sl=NormalizeDouble(level_of_trail-trailing_stop*point,digits);// calculate new stoploss level by value,
Why do you havepoint anddigits written with a small letter?
Because they are declared inside this function - this trail template works with any character passed in function parameters, not just the current one, as you might think.
Because the code is optimised and the variable is initialised once in the template, not 100 times in each place
advise how to pull quotes for a particular day from the terminal (opening, closing, max, min) to a program written by me (c++) and make the final calculations without returning new information to the terminal to the indicator, adviser, etc., just yank quotes by date to my program ? thanks in advance
advise how to pull quotes for a particular day from the terminal (opening, closing, max, min) to a program written by me (c++) and make the final calculations without returning new information to the terminal to the indicator, adviser, etc., just yank quotes by date to my program ? thanks in advance