Hi
I am trying to run CBL code in AmiBroker 6.20.1 but it is showing Multiple error messages.
Can someone please rectify this error.
Thank you
I am trying to run CBL code in AmiBroker 6.20.1 but it is showing Multiple error messages.
Code:
#Indicator
#Param "HighDays", 13
#Param "LowDays", 13
Dim CBLhi, CBLlo as single
CBLhi = IIF (H < HHV(HighDays), CBLhi[1], _
IIF(L[2]<L[1] and L[2]<L and L[1]<L, L[2], _
IIF((L[3]<L[2] and L[3]<L[1] and L[3]<L) and (L[2]<L or L[1]<L), L[3], _
IIF((L[4]<L[3] and L[4]<L[2] and L[4]<L[1] and L[4]<L) and (L[3]<L or L[2]<L or L[1]<L), L[4], _
IIF((L[5]<L[4] and L[5]<L[3] and L[5]<L[2] and L[5]<L[1] and L[5]<L) and (L[4]<L or L[3]<L or L[2]<L or L[1]<L), L[5], CBLhi[1])))))
CBLlo = IIF (L > LLV(LowDays), CBLlo[1], _
IIF(H[2]>H[1] and H[2]>H and H[1]>H, H[2], _
IIF((H[3]>H[2] and H[3]>H[1] and H[3]>H) and (H[2]>H or H[1]>H), H[3], _
IIF((H[4]>H[3] and H[4]>H[2] and H[4]>H[1] and H[4]>H) and (H[3]>H or H[2]>H or H[1]>H), H[4], _
IIF((H[5]>H[4] and H[5]>H[3] and H[5]>H[2] and H[5]>H[1] and H[5]>H) and (H[4]>H or H[3]>H or H[2]>H or H[1]>H), H[5], CBLlo[1])))))
PlotPrice("CBLhi", CBLhi, Red, 1)
PlotPrice("CBLlo", CBLlo, Green, 1)
Return 0
Thank you