How come Indi works only when compiling or Init?
HighestHighRecent=High[Highest(NULL,0,2,TTFbars,i-TTFbars+1)];
You are trying to read future bars.
I tried this :
HighestHighRecent=High[Highest(NULL,0,2,TTFbars,i-TTFbars)]; HighestHighOlder =High[Highest(NULL,0,2,TTFbars,i)]; LowestLowRecent =Low[Lowest(NULL,0,1,TTFbars,i-TTFbars)]; LowestLowOlder =Low[Lowest(NULL,0,1,TTFbars,i)]; // NOT WORKING BETTER HighestHighRecent=High[Highest(NULL,0,2,TTFbars,i)]; HighestHighOlder =High[Highest(NULL,0,2,TTFbars,i)]; LowestLowRecent =Low[Lowest(NULL,0,1,TTFbars,i)]; LowestLowOlder =Low[Lowest(NULL,0,1,TTFbars,i)]; // NOT WORKING AT ALL
Any more help please?
Baptiste George:
Any more help please?
read the documentation. TimeAsSeries
https://docs.mql4.com/series
Timeseries and Indicators Access - MQL4 Reference
- docs.mql4.com
Timeseries and Indicators Access - MQL4 Reference
Hello,
please help me out to understand why the Indi works only when adding to the chart (Init) or when compiling code ?
I have checked, and it runs every ticks... but the line code below will never occur
Cheers