How to reach more history data from High and Low arrays
How to reach more history data from High and Low arrays
Loading saved threads...
MIchal Skoda · External communityPost link
External question — Stack Overflow Stack Exchange
Author: MIchal Skoda
Original post: https://stackoverflow.com/questions/74082499
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
i have this code .. does somebody know how to reach more historic bars?
void OnTick()
{
ChartNavigate(0, CHART_END, 0);
Print(High[2000]);
}
this gives me error but with usage of High[1000] it works.
I tried that ChartNavigate funciton but it does not help.
Thanks!!
Quote
Report
Forexipy · External communityPost link
External answer — Stack Overflow Stack Exchange
Author: Forexipy
Original post: https://stackoverflow.com/a/74163474
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
It depends on the number of bars that you have loaded on the chart.
To reach the number of bars on current time frame use:
int bars = Bars;
Print(High[bars-1]);
or if you want to know how many bars are loaded in another time frame (e.g Daily) you can use :
int bars = iBars(_Symbol,PERIOD_D1);
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External answer — Stack Overflow Stack Exchange Author: Forexipy Source score (net votes, not local likes): 0 Original post: https://stackoverflow.com/a/74163474 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. It depends on the number of bars that you have loaded on the chart. To reach the number of bars on current time frame use: int bars = Bars; Print(High[bars-1]); or if you want to know how many bars are loaded in another time frame (e.g Daily) you can use : int bars = iBars(_Symbol,PERIOD_D1);
Checking account access…