Quick question for the gurus...
I want to record the values of the indicators upon the first - and only - the first tick. As I understand it, I should be using :
if(getbarstate() == BARSTATE_NEWBAR){}
The script uses colors to mark bars depending on the indicators and it runs without error. However, the current bar is blank and all bars from when I ran the script remain blank until I reload the script. In fact, I am not sure I trust the colors of the bars, historically as being the value of the indicators at first trade of bar open, as it looks a little too good to be true.
Any hints for how to get it to color my bars on first tick and leave that color for the remainder of the bar despite how the indicator is at the end of the bar?
Many thanks gurus!
(attached, please find the script)
I want to record the values of the indicators upon the first - and only - the first tick. As I understand it, I should be using :
if(getbarstate() == BARSTATE_NEWBAR){}
The script uses colors to mark bars depending on the indicators and it runs without error. However, the current bar is blank and all bars from when I ran the script remain blank until I reload the script. In fact, I am not sure I trust the colors of the bars, historically as being the value of the indicators at first trade of bar open, as it looks a little too good to be true.
Any hints for how to get it to color my bars on first tick and leave that color for the remainder of the bar despite how the indicator is at the end of the bar?
Many thanks gurus!
(attached, please find the script)
Comment