[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 982
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
declare a variable
at start - when a signal is received, increase it by 1, when N signals are received, open a trade,
reset counter...
Good afternoon!
Please help me with this question. I made an Expert Advisor. I want to know if I can work with the yield curve that it produces. The question is which curve can be considered the minimum "curve" :). I have given my curve. 1999 -2010.
P.S. The question is not idle. When I place it on real account, the curve will go down temporarily.
Good afternoon!
Please help me with this question. I have made an Expert Advisor. I want to know if I can work with the yield curve that it produces. The question is which curve can be considered the minimum "curve" :). I have given my curve. 1999 -2010.
P.S. The question is not idle. When I place it on real account, the curve will go down temporarily.
It all depends on the code of the EA itself. Maybe it's completely bare - just a toy for the tester. Well, what about the bar test? Does the EA have explicit control of bar opening?
Yes, of course it does.
static int PrevTime=0;
int start()
{
if (Time[0]<=PrevTime) return(0);
{
PrevTime=Time[0];
}
Explain the first two phrases, please.
I don't understand the textbook,
does "break" stop the whole loop and the Expert Advisor waits for a new tick?
and can it be used in "if-else", let's say if it is "break" ?
I don't understand the textbook,
does "break" stop the whole loop and the Expert Advisor waits for a new tick?
and can it be used in "if-else", let's say if it is "break" ?
break terminates the whole loop and continues executing your code from the next line after the closing parenthesis of the loop statement block.
in if-else you can use it. How else would you check the criteria for aborting a loop???
The OrderModify() function creates a separate record in the trading history. I use it when writing an Expert Advisor for implementing Trailing Stop. I.e., if condition of Trailing Stop is fulfilled and StopLoss moves, and it can happen every segunday, then the same amount of lines will appear in the history. Is there any way to avoid this? The Trailing Stop built into MetaTrader works normally.
Isn't it easier to implement a trawl using price, stop value, stop distance from price and trawl step?
Or is it more interesting to walk to the entrance from the bench via Zimbabwe?
Wouldn't it be simpler to use price, stop value, stop distance from price and trawl step to implement the trawl???
Or, is it more interesting to walk to the entrance from the bench through Zimbabwe?
OK, we go in through the front entrance. Attention, one more question:
Here is a snippet of code from the example of TrailingStop implementation
}
This piece of code uses OrderModify() to modify an order according to TrailingStop conditions. Function OrderModify() creates a separate record in the trading history. That is, if the Trailing Stop conditions are met and Stop Loss moves, and this can happen every second, the same amount of lines will appear in the history. Is there any way to avoid this? The Trailing Stop built into MetaTrader works normally.
OK, let's go in through the front door. Attention, one more question:
Here is a piece of code from the example implementation of TrailingStop
}
This piece of code uses OrderModify() to modify an order according to TrailingStop conditions. Function OrderModify() creates a separate record in the trading history. That is, if the Trailing Stop conditions are met and Stop Loss moves, and this can happen every second, the same amount of lines will appear in the history. Is there any way to avoid this? The Trailing Stop built into MetaTrader works properly.
There is no way to avoid it. Each trade, like any position modification, creates its own log entry