Professional Documents
Culture Documents
Best Buy-Sell Indicator
Best Buy-Sell Indicator
Best Buy-Sell Indicator
// Deviation
// * I'm sure there's a way I could write some of this cleaner, but meh.
dev = stdev(bb_source, bb_length)
bb_dev_inner = bb_mult * dev
// Upper bands
inner_high = bb_basis + bb_dev_inner
// Lower Bands
inner_low = bb_basis - bb_dev_inner
// Sell only if the sell signal is triggered and we are not already short
SHORT= not isShort and (crossunder(fast_ma, bb_basis) and close <
bb_basis and abs(AO)==2)
c_red = (fast_ma < bb_basis)
if (LONG)
isLong := true
isShort := false
if (SHORT)
isLong := false
isShort := true
// eof