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
By the way, there is another thing about the protection you added. Since I have a delay of 1-2 minutes before the correct value is calculated, during which the variables are equal to zero, I switch the current timeframe to another one for quick update - the values are immediately recalculated. Probably, it is possible to make some software crutch on this principle?
I hate the word 'crutch'.
I've already thought of everything beforehand and it's very good that you asked. We need to turn LastProfitForPeriod from void into bool. If there is an error - for example, the date is not found or something else, we return false and so on.
Thus, there will be no loss of minutes.
If you get "false", reset the time:
Version 1.003
I hate the word 'crutch'.
I've already thought of everything beforehand and it's very good that you asked. We need to turn LastProfitForPeriod from void into bool. If there is an error - for example, the date is not found or something else, we return false and so on.
Thus, there will be no loss of minutes.
About "crutch" - yes, there is some careless attitude to programming in this word :)
Yes, the lost minute effect is gone in v.3 of the script.
As for "crutch" - yes, there is some careless attitude to programming in that word :)
Yes, the lost minute effect is gone in v.3 of the script.
It's an indicator:)
It's an indicator:)
Yes, that's right - still getting confused.
I have added a block to calculate the time offset in relation to the closing of the last transaction. When trying to use last_time and n for line offset later on, I get a compile-time error :(
Or maybe there is a function that shifts an object forward/backward by specified number of bars? What is better? I confess that so far my independent efforts have been unsuccessful :(
When creating ObjectCreate (chart_ID,name,OBJ_VLINE,sub_window,time,0), I want to change time value so it would not be TimeCurrent(), butlast_time with an offset for the period equal to n.
Or maybe there is a function that shifts an object forward/backward by specified number of bars? What is better? I confess that so far my independent efforts have been unsuccessful :(
The line is created once - in OnInit().
Then it is only moved -VLineMove
Do I understand correctly that I need to make changes in the last line of the code snippet (time=0 in particular)?
Or VLineMove is a function, which still needs to be initiated in some place (e.g. in OnCalculate) and pass the incoming parameters to it?
I'm completely confused :)