简体   繁体   中英

i want to modify this like buy when candles breaks above or close > resistance and sell when candles break down or close < support

The conditions are:

buy=close > support sell=close < resistance and the code.

//Plot Bar plotshape(buy ? lowlel : na,title="Up", color=color.new(#00ff00,1), text="buy",location=location.belowbar, style=shape.triangleup, size=size.small) plotshape(sell ? highlel: na,title="Down",

Could be something like this

buy = ta.crossover(close, support)
sell = ta.crossunder(close, resistance)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM