Hi, look this pics
I print CurrentBar in all bar chart but the BarNumber( is egual to currentBar) =1 does not correspond to the first bar of the day
Problem currentBar is not correct [SOLVED]
Problem currentBar is not correct
- Attachments
-
- Immagine1.png
- (10.63 KiB) Downloaded 640 times
-
- Immagine.png
- (156.92 KiB) Downloaded 640 times
- TJ
- Posts: 7742
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Problem currentBar is not correct
Hi, look this pics
I print CurrentBar in all bar chart but the BarNumber( is egual to currentBar) =1 does not correspond to the first bar of the day
Have you looked up the definition of CurrentBar ?
It is in the wiki under
PowerLanguage Keyword Reference
> Data Information/General (77 P)
Re: Problem currentBar is not correct
yes..i read it
I try to set MAx number of study will reference to 0
but it start to calcularte him from 8 currentBar....
i think the problem is that i must to start to 1 (not to 0)
I try to set MAx number of study will reference to 0
but it start to calcularte him from 8 currentBar....
i think the problem is that i must to start to 1 (not to 0)
Re: Problem currentBar is not correct
Hi turbofib.
Currentbar is the first bar on the left after the Maxbarsback. That is, if maxbarsback = 20, after 20 bars it will return the currentbar and it will be currentbar = 1 and it is the bar that is currently being evaluated.
It means that if Currentbar = 8, bar 8 is evaluated after the maxbarsback.
But I do not understand what you want to do ... do you want to refer to the first bar of the day?
Currentbar is the first bar on the left after the Maxbarsback. That is, if maxbarsback = 20, after 20 bars it will return the currentbar and it will be currentbar = 1 and it is the bar that is currently being evaluated.
It means that if Currentbar = 8, bar 8 is evaluated after the maxbarsback.
But I do not understand what you want to do ... do you want to refer to the first bar of the day?