- Topics: 5
- Replies: 377
- Posts: 382
Which value do you mean though? Do you mean the value of the charts close? The value of the Bolinger Bands High, or Low, or the difference between the two BB lines?
You would use the ValueWhen() function, with V3 as the trigger, but I am not sure which value to reference?
Once the ValueWhen() function was setup, you could wrap a LowestLow() function around it to see if it is the lowest value over the last 21 days.
This example is using the difference between the BB High – Low values.
//Set Bollinger Band Values
UBB = BB(BARS=10).UpperLine ;
LBB = BB(BARS=10).LowerLine ;
//Find Convergence Between BB lines
V3=VERGENCE(UBB, LBB, LOOKBACK=2);
//Find Distance between Upper / Lower Bands
V4 = UBB-LBB;
//Find the Distance Balue when there is a convergence
V5 = VALUEWHEN(V4,V3);
//Find the lowest BB distance value over the last 21 bars
V6 = LOWESTLOW(V5, BACKTYPE=Bars, BARS=21, INCBAR=True) ;
//Is the value a 21 bar lowest value
V4 == V6
- This reply was modified 3 weeks ago by Matthew.