Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 122
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
Hello! Looking for errors in this function.
The idea is that pending orders that have not opened should be deleted two days after they are placed.
min=1440;
Why would you want to track and delete pending orders? You should set their datetime expiration=TimeCurrent()+min*60+sec; they will be deleted themselves after min*60+sec.
Why do you need to monitor and delete pending orders? You need to set datetime expiration=TimeCurrent()+min*60+sec; they will be deleted by themselves after min*60+sec.
paladin80:
OrderOpenTime() returns the order open time.
For a pending order, this function returns zero.
OrderOpenTime() returns the order open time.
For a pending order, this function returns zero.
Good afternoon. Help me deal with the custom indicator.
I am solving the problem of determining the distance to the trend line. I need to get the distance to the trend line exactly on the time frame where it is plotted (regardless of the time frame that is opened in the terminal). The current value of the trend line can be obtained using the function ObjectGetValueByShift. Since calculations can be done only by the open time, I wrote a small indicator. I was attracted by the fact that the iCustom function has the timeframe parameter, but I wonder how much this parameter is considered when calling the indicator.
Here is the indicator:
The indicator considers the current value of the trend.
I call the indicator itself:
Here, for example, PERIOD_D1 time is passed to the indicator as a parameter, on which the trend is plotted, and for which the distance should be calculated.
I calculate the distance to the trend simply:
It seems to be so, but not so: when switching to other timings (different from D1), the indicator returns other values (correct for the timings I switch to).Here we have a question: to what extent a period is considered when calling the iCustom function ?
Or maybe I have messed up the indicator?
t = OrdersTotal();
why count???? counted???
So I did it to pass the value by reference. The logic is simple!
In my version, the function is shorter ... :)
Yes, by the way, this way of implementation is smarter. Only in start there was more space occupied by additional functions. It turned out like this:
It's not like there's anything to optimise, is there?
I mean, it's much more convenient, when there's nothing at all in the start. And everything is called purely by functions. And last time it turned out that the start has a lot of all sorts of overgrowths on the main functions and overgrowths of additional ones...
Good day!
Please help and explain why the Expert Advisor is not working or trading?
Good day!
Please help and explain why the Expert Advisor is not working or trading?