Newbie need your help with some basic understanding which I don't have
I have the following study script:
Code: Select all
inputs:
Price( Close ),
Length_2D( 2 ),
Length_3D( 3 ),
Length_5D( 5 ),
OverSold( 20 ),
OverBought( 80 ),
OverSColor( Cyan ),
OverBColor( Red ) ;
variables: var2D( 0 ), var3D( 0 ) , var5D( 0 ), BollingerBand_High(0), BollingerBand_Low(0);
var2D = RSI( Price, Length_2D ) ;
var3D = RSI( Price, Length_3D ) ;
var5D = RSI( Price, Length_5D ) ;
BollingerBand_Low = BollingerBand(close, 20, -2) ;
BollingerBand_High = BollingerBand(close, 20, 2) ;
//print( BollingerBand_Low , BollingerBand_High) ;
if var2D > OverBought and var3D > OverBought and var5D > OverBought and close > BollingerBand_High then
Value3 = Text_New(Date, Time, high + 0.08 , "S") ;
if var2D < OverSold and var3D < OverSold and var5D < OverSold and close < BollingerBand_Low then
Value4 = Text_New(Date, Time, low - 0.08 , "B1 " + numtostr(low ,2)) ;
http://go-ram.s3.amazonaws.com/MultiCha ... B_text.png
Don't know if needed but this is the script properties:
http://go-ram.s3.amazonaws.com/MultiCha ... erties.png
now, if i remark one line of code, for example:
Code: Select all
var2D = RSI( Price, Length_2D ) ;
var3D = RSI( Price, Length_3D ) ;
//var5D = RSI( Price, Length_5D ) ;
http://go-ram.s3.amazonaws.com/MultiCha ... B_text.png
Can anyone explain the logic behind this? I was under the impression that each candle fires the script only once..
Thank you all in advance,
Best,
R.