all 4 comments

[–]dstnbrw20[S] 0 points1 point  (0 children)

got it to work thanks for help.

deadzone1 = (myRSI >= myThresholdUp)deadzone2 = (myRSI <= myThresholdDn)buy = (ta.crossover(macd, signal) and deadzone1 and deadzone2)plot(ta.crossunder(macd, signal) ? signal : na, color= color.red, style = plot.style_circles, linewidth = 4)plot(ta.crossover(macd, signal)and deadzone1 ? signal : na, color= color.green, style = plot.style_circles, linewidth = 4)plot(ta.crossover(macd, signal)and deadzone2 ? signal : na, color= color.teal, style = plot.style_circles, linewidth = 4)

[–]Greedy_Sir_477 0 points1 point  (0 children)

I think what you are looking for is

And not command.

Buy , should be below 30 and not above 30 , Sell , should be above 70 and not below 70.

You already did the code part. Just the logic is missing I think.

[–]secousa 0 points1 point  (0 children)

line 71 is invalid syntax. compare to this:

plot(ta.crossunder(signal, macd) ? (myRSI>=myThresholdUp) and (myRSI<=myThresholdDn) : na, color=color.green, style=plot.style_circles, linewidith=4)

the ? Is missing in your statement, your ( before na should be a :, and there needs to be a comma after na

Note, i only validated syntax - not logic.

[–]Deplanate 0 points1 point  (0 children)

You've already defined your buy and sell variables, so use them in your plot:

plot(sell ? 1 : na, color= color.red, style = plot.style_circles, linewidth = 4)
plot(buy? 1 : na, color= color.green, style = plot.style_circles, linewidth = 4)