//@version=2 strategy("Shadow Trading", overlay=true) size = input(1,type=float) pinnaL = abs(high - close) pinnaS = abs(low-close) scarto = input(title="Tail Tollerance", type=float, defval=0.0018) corpo = abs(close - open) dim = abs(high-low) min = input(0.001) shortE = (open + dim) longE = (open - dim) barcolor(dim > min and (close > open) and (pinnaL > (corpo*size)) and (open-low min) and (close > open) and (pinnaL > (corpo*size)) and (open-low min and(close < open) and (pinnaS > (corpo*size)) and (high-open min) and(close < open) and (pinnaS > (corpo*size)) and (high-open0) >= DayClose longCondition = (close > open) and (pinnaL > (corpo*size)) and (open-lowmonthBegin and year(time) >yearBegin) if (longcond) strategy.entry("short", strategy.short, stop = low - offset) //strategy.close("short", when = closup) shortCondition = (close < open) and (pinnaS > (corpo*size)) and (high-openmonthBegin and year(time) >yearBegin) if (shortcond) strategy.entry("long", strategy.long, stop = high + offset) //strategy.close("long", when = closup) Target = input(20) Stop = input(70) //- 2 Trailing = input(0) CQ = 100 TPP = (Target > 0) ? Target*10: na SLP = (Stop > 0) ? Stop*10 : na TSP = (Trailing > 0) ? Trailing : na strategy.exit("Close Long", "long", qty_percent=CQ, profit=TPP, loss=SLP, trail_points=TSP) strategy.exit("Close Short", "short", qty_percent=CQ, profit=TPP, loss=SLP, trail_points=TSP)