I'm an advanced user. But I don't write that often. That's why. I can't keep up with some innovations. And sometimes I just forget things.
Please help me with one question. I can't remember one thing.
Here's the situation. I've defined extern variables. I've defined many of them. 20 variables.They are displayed in the input menu of the program, when you attach this program to the chart.
Here's the question. I can't remember. How do I separate blocks of these variables with comments? In the input menu. For example:
This is a block on changing MA variables (comment)
Period MA
Setting method MA
Price MA
This is a block on changing MACD variables (comment)
..........................
...........................
...........................
This is a block on changing BB variables (comment)
.........................
..............................
...........................
It seems that before I entered such comments with code comment function.That is, I wrote // or /* */. But now something does not work.
externstring a1 = "Это блок по изменению переменных MA (комментарий)";
..............
..............
..............
externstring a2 = "Это блок по изменению переменных MACD (комментарий)";
Good evening, any tips please. In OnInit function creates two horizontal lines, in OnTick two functions, one sends push and mail notification if Bid > first line, second if Bid < second line. Bid=line did not do it, to avoid gaps. Of course, I also faced with the fact that if the condition is fulfilled, the notification comes with every tick, which is bad. How to solve this problem? You can set timeout or number of notifications in Standard Alert settings.
If fStopLevel turns out to be zero and the account type is not ECN, then fStopLevel should be forced to be equal to three spreads.
Before setting stops (both Stop Loss and Take Profit) check that the new level is at or above the Stop Level from the order close price. To check the stop for a Buy order this is done as follows:
if (fNewSL - Ask - fStopLevel < -Point() / 10)
{
// Stop Loss на цене fNewSL ставить нельзя. Ближайший возможный уровень: Ask + fStopLevel
}
The solution to the second problem: Compare real values with some accuracy, as the equality of real numbers cannot be achieved always and everywhere. I have already given an example of comparison above in the code of stop level validation.
There are two errors in this code that are striking:
Lack of check on the minimum allowable stop size (called Stop Level).
Incorrect comparison of real numbers.
To solve the first problem we need to get the current Stop Level:
If fStopLevel turns out to be zero and the account type is not ECN, then fStopLevel should be forced to be equal to three spreads.
Before setting stops (both Stop Loss and Take Profit) check that the new level is at or above the Stop Level from the order close price. To check the stop for a Buy order this is done as follows:
For a Sell order stop:
The solution to the second problem: Compare real values with some accuracy, as the equality of real numbers cannot be achieved always and everywhere. I already gave an example of comparison above in the code of stop level validation.
Thank you.
However, the question is not closed. OrderModify starts to trigger immediately when an order is opened. Where is the error? (I repeat - on all(all) currencies/futures it works, on Silver it does not)
However, the question is not closed. OrderModify starts to trigger immediately when an order is opened. Where is the error? (I repeat - on all(all) currencies/futures it works, on Silver it does not)
1. Directive
#property strict
are you using ?
2) Does this happen with Sell and Buy, or only with Sell?
3. is the Stop loss set at position opening or should the trader set it if possible?
Торговая деятельность в платформе связана с формированием и отсылкой рыночных и отложенных ордеров для исполнения брокером, а также с управлением текущими позициями путем их модификации или закрытия. Платформа позволяет удобно просматривать торговую историю на счете, настраивать оповещения о событиях на рынке и многое другое. Открытие позиций...
However, the issue is not closed. OrderModify starts working immediately when an order is opened. Where is the error? (I repeat - it works on all(all) currencies/futures, it does not work on Silver)
Show the log snippet (if online, the Experts tab) where you can see the market order opening and modifications and indicate which TrailingStop and TrailingStep values were used.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Good afternoon to everyone who cares!
I'm an advanced user. But I don't write that often. That's why. I can't keep up with some innovations. And sometimes I just forget things.
Please help me with one question. I can't remember one thing.
Here's the situation. I've defined extern variables. I've defined many of them. 20 variables.They are displayed in the input menu of the program, when you attach this program to the chart.
Here's the question. I can't remember. How do I separate blocks of these variables with comments? In the input menu. For example:
This is a block on changing MA variables (comment)
Period MA
Setting method MA
Price MA
This is a block on changing MACD variables (comment)
..........................
...........................
...........................
This is a block on changing BB variables (comment)
.........................
..............................
...........................
It seems that before I entered such comments with code comment function.That is, I wrote // or /* */. But now something does not work.
Like this
Like this.
Thanks, that reminds me!!!
Try it like this:
This is to show all significant digits of the quote. If some other number of digits is needed, replace Digits() with a specific number.
Try it like this:
This is to show all significant digits of the quote. If you need any other number of digits, replace Digits() with a specific number.
Now it prints correctly 15,155, however - invalid stoploss for OrderModify function
This problem is only with Silver in OrderModify
Now outputs correctly in Print 15,155 , however - invalid stoploss for OrderModify function
This problem is only with Silver in OrderModify
There are two errors in this code:
To solve the first problem we need to get the current Stop Level:
If fStopLevel turns out to be zero and the account type is not ECN, then fStopLevel should be forced to be equal to three spreads.
Before setting stops (both Stop Loss and Take Profit) check that the new level is at or above the Stop Level from the order close price. To check the stop for a Buy order this is done as follows:
For a Sell order stop:
The solution to the second problem: Compare real values with some accuracy, as the equality of real numbers cannot be achieved always and everywhere. I have already given an example of comparison above in the code of stop level validation.
There are two errors in this code that are striking:
To solve the first problem we need to get the current Stop Level:
If fStopLevel turns out to be zero and the account type is not ECN, then fStopLevel should be forced to be equal to three spreads.
Before setting stops (both Stop Loss and Take Profit) check that the new level is at or above the Stop Level from the order close price. To check the stop for a Buy order this is done as follows:
For a Sell order stop:
The solution to the second problem: Compare real values with some accuracy, as the equality of real numbers cannot be achieved always and everywhere. I already gave an example of comparison above in the code of stop level validation.
Thank you.
However, the question is not closed. OrderModify starts to trigger immediately when an order is opened. Where is the error? (I repeat - on all(all) currencies/futures it works, on Silver it does not)
Thank you.
However, the question is not closed. OrderModify starts to trigger immediately when an order is opened. Where is the error? (I repeat - on all(all) currencies/futures it works, on Silver it does not)
1. Directive
are you using ?
2) Does this happen with Sell and Buy, or only with Sell?
3. is the Stop loss set at position opening or should the trader set it if possible?
Thank you.
However, the issue is not closed. OrderModify starts working immediately when an order is opened. Where is the error? (I repeat - it works on all(all) currencies/futures, it does not work on Silver)
Show the log snippet (if online, the Experts tab) where you can see the market order opening and modifications and indicate which TrailingStop and TrailingStep values were used.