HELP WITH coding a SCREENER with MACD and Stochastic PLEASE
Forums › ProRealTime English forum › ProScreener support › HELP WITH coding a SCREENER with MACD and Stochastic PLEASE
- This topic has 10 replies, 2 voices, and was last updated 3 years ago by robertogozzi.
Tagged: Macd, Stochastic
-
-
07/22/2021 at 1:20 PM #17398907/22/2021 at 1:33 PM #173995
Thank you for sharing your idea.
07/22/2021 at 1:55 PM #173999Give your topic a meaningful title. Describe your question or your subject in your title. Do not use meaningless titles such as ‘Coding Help Needed’.
Thank you 🙂
07/22/2021 at 2:04 PM #17400007/22/2021 at 3:34 PM #174007There you go:
1234567891011121314151617181920Kline = Stochastic[11,4](close)//Dline = Average[3](Kline)L1 = Kline <= 25S1 = Kline >= 75//MyMACD = MACDline[12,26,9](close)Signal = MACDSignal[12,26,9](close)L2 = MyMACD > SignalS2 = MyMACD < Signal//CondL = L1 AND L2CondS = S1 AND S2//Result = 0IF CondL THENResult = 1ELSIF CondS THENResult = 2ENDIFSCREENER[Result](Result AS "1=↑, 2=↓")07/22/2021 at 3:56 PM #17400907/22/2021 at 4:23 PM #174010I tried to paste it and didn’t get any error.
What version are you currently using?
07/22/2021 at 4:33 PM #17401207/22/2021 at 5:31 PM #174013I got it, MACDSignal is a new instruction added in v11.
Use this code (this works with both versions):
1234567891011121314151617181920Kline = Stochastic[11,4](close)//Dline = Average[3](Kline)L1 = Kline <= 25S1 = Kline >= 75//MyMACD = ExponentialAverage[12](close) - ExponentialAverage[26](close)Signal = ExponentialAverage[9](MyMACD)L2 = MyMACD > SignalS2 = MyMACD < Signal//CondL = L1 AND L2CondS = S1 AND S2//Result = 0IF CondL THENResult = 1ELSIF CondS THENResult = 2ENDIFSCREENER[Result](Result AS "1=↑, 2=↓")08/05/2021 at 11:38 AM #17473708/05/2021 at 11:47 AM #174739It works fine for me (tested on US shares, both 4h and 2min).
Try several lists or try changing some settings for indicators.
I am attaching the ITF file, in case you made some errors copying & pasting.
-
AuthorPosts
Find exclusive trading pro-tools on