Errors, bugs, questions - page 1845

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
Question-please ask the developers.
The possibility to save some variables or arrays when switching timeframes, so that their re-initialization would not happen, is very missing. Or can it be done somehow throughOnDeinit by defining a REASON_CHARTCHANGEreason code?
I just have quite cumbersome time-independent calculations in the body of my program and I don't want to recalculate them every time. I feel we miss some special type of global variables, which aren't reinitialized when timeframe changes. I've learned how to do it with simple variables without global variables in the terminal, but with structures or arrays I have no idea how to do it, and it seems that such a possibility simply does not exist. You can, of course, use resources, but it's very confusing.
how?
Like this:
For example, like this:
That's not what was asked, but perhaps that would suit the author of the question, to which there is an unequivocal answer - NONE.
There is no refusal in Service Desk
Forum on trading, automated trading systems and trading strategies testing
Bugs, bugs, questions
fxsaber, 2017.04.02 10:34
Is it possible to compensate for the absence of pointers to an array by introducing the ability to return an array with a function?Forum on trading, automated trading systems and trading strategy testing
Bugs, bugs, questions
fxsaber, 2017.04.01 10:20
Once upon a time , the [] operator was added to the string typeIs it possible on the developers side to add an = operator for arrays?
Since there are no pointers, such an operator would make the language more flexible - found situations where it would be VERY handy.
Try using an indicator. There global variables are not reinitialised when the TF changes (as far as I remember). Or through a file.
It's the other way round:
Forum on trading, automated trading systems and trading strategy testing
Initialization of global program variables and other useful knowledge.
Artyom Trishkin, 2016.12.05 20:27
Answer received from SD:
I think you can safely use such a feature of global variable EAs.
Try using an indicator. The global variables are not reinitialised when the TF is changed (as far as I remember). Or through a file.
This is what I use the indicator for. They are re-initialized. The file is not an option at all, it is slow and it is difficult to provide good synchronization. I'd better useResourceCreate in this case.But this all is not very convenient. If I have dozens of arrays, some of them with several Mb, I must write at least two functions of reading and writing, create a handler atOnDeinit. I've already experimented with it all, faced the problem of synchronization, because resources and files have their own separate lives in multithreading. Why make a hump when there's just not enough possibility to not re-initialize at certain event, in my case timeframe change.
Indicator and I use it. Reinitialised. File is not an option at all, it's slow and it's hard to provide quality synchronization. I'd better useResourceCreate in this case.But this all is not very convenient. If I have dozens of arrays, some of them with several Mb, I must write at least two functions of reading and writing, create a handler atOnDeinit. I've already experimented with it all, faced the problem of synchronization, because resources and files have their own separate lives in multithreading. Idon't know why I bothered with it when I simply want to avoid reinitialization of some particular event, in my case it was a timeframe change.
It's exactly the opposite:
But man, if I need that chip in the indicator!
For example, like this:
thanks for the example, but creating an object of a complex type because of a single array is exactly what I don't want, it all feels like excessive code ))
That's not what was asked, but perhaps that would suit the author of the question, to which there is an unequivocal answer - NONE.
There is no refusal to do so at Service Desk
let's hope they will introduce this feature, although it would be more usual to introduce a pointer for arrays
It's exactly the opposite: