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
How is it different ?
How is it different ?
How is it different ?
Literally different.
What is the question?
1. take the script twisted to the post and execute on the chart. The script should copy a certain number of bars and perform unwinding of the 20 oldest ones.
This way is used (I understand there are no checks and all sorts of traps for errors, but still)
So with those parameters that I specified (number of bars and M1) the script runs but sometimes it refuses to work NORMALLY. It happens at a certain number of bars (I got more than 368700).
At 368800 it returns much less bars (but always a different number - 368732 / 368735 / 368736 or something in this vicinity).
But it doesn't always work correctly even at 360000, there were cases when it just copied 10000 bars.
2. The variant where two dates are specified really shocked me. Not only it wouldn't accept 0 as the first date (which makes sense in my opinion) but it also copies up to 10000.
Although with 0 as int as start_time it's understandable (I have experience), it's all about functions overloading and compiler "not understanding" certain things. But that's why 10000 bars is a separate question which is called "in a million".
The 10,000 minute bars as we understand it will not go beyond 2011, if I understand correctly, they will not go beyond February (and as it becomes clear from all of the above at least 360000 is loaded for sure).
PS
At the same time, the speed of normal and "buggy" (when the script copies only 10000 bars) differs many times over.
PPS
Please make sure you bring certain sections of help (or rather their examples) to their logical conclusion, to avoid ambiguity and other "silly" situations.
Checks should be placed additionally, etc. Also, in this case there are no cross references in parameter descriptions (at least in timeframe) and it is not clear what type start_time and start_pos have.I guess that datetime (otherwise why would the compiler swear by 0 as start_time).
Is this a bug or my lack of skill?
The chart jerks when navigating from zero bar. I purposely inserted slips between navigation and update to highlight the problem. But the bug exists even without slips. It turns out that ChartNavigate() first moves the chart to zero and then moves it back. In addition, it does not do this every time.
At least, the fact that the bug does not exist every time you call ChartNavigate(), it appears when you run it without slips.
Is this a bug or my lack of skill?
The chart jerks when navigating from zero bar. I purposely inserted slips between navigation and update to highlight the problem. But the bug exists even without slips. It turns out that ChartNavigate() first moves the chart to zero and then moves it back. In addition, it does not do this every time.
At least, the fact that the bug does not exist every time you call ChartNavigate(), it appears when you run it without slips.
Try the example from the branch ChartNavigate function doesn't work, Please help
So, what is there in this example that is so fundamentally different from my code?
It's just that in your code navigation is called once, whereas I need to hold the chart on the desired bar all the time (regardless of user actions).
I tried your example and ran my code without chart update (although it's important to me because the program uses a lot of graphical transformations), but it didn't work either. The jerk remains. I still navigate to the same point, and then navigate to the zero bar.
I also find using navigation from the current bar unacceptable, because the user can inadvertently move the chart while the program is running.
Is the story all tucked away?
So, what is there in this example that is so fundamentally different from my code?
It's just that in your code navigation is called once, while I need to keep the chart on the desired bar all the time (regardless of user's actions).
After reviewing your example, ran my code without chart refresh (although it's important to me since the program also uses a bunch of graphic conversions), but it didn't help either. The jerk remains. I still navigate to the same point, and then navigate to the zero bar.
I also find using navigation from the current bar unacceptable, because the user can inadvertently move the chart while the program is running.