Please see attached screenshot…it’s and over bought or over sold setups using MACD and Stochastic ( settings in screenshot) and will use it mainly on 4 hour, daily, weekly timeframes.
Thanks very much in advance
Thank you for sharing your idea.
Give 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 🙂
Noted for next time.. I’m travelling at the moment 🙂
There you go:
Kline = Stochastic[11,4](close)
//Dline = Average[3](Kline)
L1 = Kline <= 25
S1 = Kline >= 75
//
MyMACD = MACDline[12,26,9](close)
Signal = MACDSignal[12,26,9](close)
L2 = MyMACD > Signal
S2 = MyMACD < Signal
//
CondL = L1 AND L2
CondS = S1 AND S2
//
Result = 0
IF CondL THEN
Result = 1
ELSIF CondS THEN
Result = 2
ENDIF
SCREENER[Result](Result AS "1=↑, 2=↓")
Hi, I pasted the code, but got “syntax errors” line 7,8?
I tried to paste it and didn’t get any error.
What version are you currently using?
Ah, it’s the older 10.3 because some of my indicators don’t work so good on the newest version.
I got it, MACDSignal is a new instruction added in v11.
Use this code (this works with both versions):
Kline = Stochastic[11,4](close)
//Dline = Average[3](Kline)
L1 = Kline <= 25
S1 = Kline >= 75
//
MyMACD = ExponentialAverage[12](close) - ExponentialAverage[26](close)
Signal = ExponentialAverage[9](MyMACD)
L2 = MyMACD > Signal
S2 = MyMACD < Signal
//
CondL = L1 AND L2
CondS = S1 AND S2
//
Result = 0
IF CondL THEN
Result = 1
ELSIF CondS THEN
Result = 2
ENDIF
SCREENER[Result](Result AS "1=↑, 2=↓")
Hi, sorry for the delay. I’ve been travelling…
I’ve tried a few times, but I can’t get the screener to show up any trades. ..although there are no errors now.
Is something wrong that I need to change?
thanks
Neal
It 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.