//take it only if over the BB limit buy_limit_entry = isOverBBTop ? high_range==high_range[1] ? high_range+0.001: na : na sell_limit_entry = isUnderBBBottom ? low_range==low_range[1] ? low_range-0.001: na : na
take_profit_buy= isOverBBTop ? high_range==high_range[1] ? (buy_limit_entry + buy_limit_entry-bblow)+(buy_limit_entry + buy_limit_entry-bblow)*tp/500 : na : na take_profit_sell= isUnderBBBottom ? low_range==low_range[1] ?(sell_limit_entry -(bbhigh-sell_limit_entry))-(sell_limit_entry-(bbhigh-sell_limit_entry))*tp/500 : na : na
take_profit2_buy= isOverBBTop ? high_range==high_range[1] ? buy_limit_entry + 2*(buy_limit_entry-bblow)+(buy_limit_entry + 2*(buy_limit_entry-bblow))*tp/500 : na : na take_profit2_sell= isUnderBBBottom ? low_range==low_range[1] ? sell_limit_entry - 2*(bbhigh-sell_limit_entry)-(sell_limit_entry - 2*(bbhigh-sell_limit_entry))*tp/500 : na : na
stop_loss_buy = isOverBBTop ? high_range==high_range[1] ? bblow : na : na stop_loss_sell = isUnderBBBottom ? low_range==low_range[1] ? bbhigh : na : na
highlightHigh = isOverBBTop ? lime : aqua highlightLow = isUnderBBBottom ? lime : aqua
colorLineUp = buy_limit_entry ? blue : blue colorLineDown = sell_limit_entry ? red : red
barcolor((high >= lowerBB and low <= upperBB) ? aqua : na) barcolor((high < sell_limit_entry and low > take_profit_sell) ? orange : na) barcolor((low > buy_limit_entry and high < take_profit_buy) ? orange : na) barcolor(high >= take_profit_buy and not(na(buy_limit_entry)==1) ? fuchsia : low <= take_profit_sell and not(na(sell_limit_entry)==1) ? fuchsia : na) //plot Statements bbup=plot(upperBB, title="BB Upper Band", style=linebr, linewidth=2, color=highlightHigh) bbdo=plot(lowerBB, title="BB Bottom Band",
pratik7590
⋅
Chill guys it won't work, too many fake signals
ninjadave_uk
⋅
Great strategy, just one thing there seems to be a bug with the way its drawing the SL line for shorts in forex pairs, its a lot higher than the upper bb line so the tp lines are really far down. Thx for your work! How to use this strat is in the comments section of the previous version, it has the same name but without 'update' in the title
Help please
David