Welcome to the BEST forum for traders

Did you know we're sharing tons of exclusive content here?
Our community is growing quickly. Take a look around and say "Hello".

trade signal

Jul 29, 2021 - 8:08 PM

Viewed 396 times

https://best-trading-indicator.com/community/bti/forums/4180/topics/25293 COPY
  • Hi
    i wrote a code to show overbought and oversold on the chart, but there is many signals on the chart so, i want to show trade signal when a reverse candle is printed on the chart how can i do this? i mean some kind of condition that says if overbought happened then signal the first bull candle
    this is my code
    rsiSource = input(title=RSI Source, type=input.source, defval=close)
    rsiLength = input(title=RSI Length, type=input.integer, defval=14)
    rsiOverbought = input(title=RSI Overbought Level, type=input.integer, defval=65)
    rsiOversold = input(title=RSI Oversold Level, type=input.integer, defval=25)
    rsiValue = rsi(rsiSource, rsiLength)
    rsiOB = rsiValue >= rsiOverbought
    rsiOS = rsiValue <= rsiOversold
    plotshape(rsiOS, title=Long, location=location.belowbar, color=color.green, style=shape.triangleup, text=OB, size=size.small)
    plotshape(rsiOB, title=Short, location=location.abovebar, color=color.red, style=shape.triangledown, text=OS, size=size.small)

    0
  • Hi Meti

    i mean some kind of condition that says if overbought happened then signal the first bull candle

    Something like this

    bullCandle = close > open
    cond = rsiOB and bullCandle and not bullCandle[1]
    
    0
CONTENTS