i have RSI strategy which buys when oversold. is there a way to code that only submits buy order if stock is above 200 ma. i have taken two courses on pine script but can not work out how to do it.
Asked
Active
Viewed 308 times
-2
-
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Sep 06 '21 at 16:44
1 Answers
0
look at this, done that few days back, similer to your question.
How to write the script to plot only the buy MACD signals when SMA 50 crossabove SMA 200

SafetyHammer
- 391
- 3
- 5
-
thank you yes,quite similar, but i need price to be above 200 sma as a filter whether too buy or not. – nezas4444 Sep 02 '21 at 18:23