Below code i have written works perfectly as an indicator but not working in proscreener to identify assets with all short, medium and long trends are going up or down. Please can some help me in this regard?
Amacd1= exponentialaverage[8](close)-exponentialaverage[34](close)
Asignal1= average[34,1](Amacd1)
Ahist1= Amacd1-Asignal1
Amacd2= exponentialaverage[8](close)-exponentialaverage[55](close)
Asignal2= average[55,1](Amacd2)
Ahist2= Amacd2-Asignal2
Bmacd1= exponentialaverage[8](close)-exponentialaverage[89](close)
Bsignal1= average[89,1](Bmacd1)
Bhist1= Bmacd1-Bsignal1
Bmacd2= exponentialaverage[8](close)-exponentialaverage[144](close)
Bsignal2= average[144,1](Bmacd2)
Bhist2= Bmacd2-Bsignal2
Cmacd1= exponentialaverage[8](close)-exponentialaverage[233](close)
Csignal1= average[233,1](Cmacd1)
Chist1= Cmacd1-Csignal1
Cmacd2= exponentialaverage[8](close)-exponentialaverage[377](close)
Csignal2= average[377,1](Cmacd2)
Chist2= Cmacd2-Csignal2
C3 = Ahist1 > 0 and Ahist2 > 0 and Bhist1 > 0 and Bhist2 > 0 and Chist1 > 0 and Chist2 > 0
C4 = Ahist1 < 0 and Ahist2 < 0 and Bhist1 < 0 and Bhist2 < 0 and Chist1 < 0 and Chist2 < 0
BollingerBandUp = BollingerUp[20](close)
BollingerBandDown = BollingerDown[20](close)
n=20 //période
coeff=1.5
REM Moving Average
MA = Average[N](TypicalPrice)
//REM Upper Keltner Band
KeltnerChannelsUp = MA + coeff*Average[N](Range)
//REM Lower Keltner Band
KeltnerChannelsDown = MA - coeff*Average[N](Range)
//TodayVol = Volume
//C2 = TodayVol >= (AvgVol *2)
C1 = BollingerBandUp[0] < KeltnerChannelsUp[0] and BollingerBandDown[0] > KeltnerChannelsDown[0]
//
//C2 = BollingerBandUp[1] > KeltnerChannelsUp[1] and BollingerBandDown[1] < KeltnerChannelsDown[1]
Amacd1= exponentialaverage[8](close)-exponentialaverage[34](close)
Asignal1= average[34,1](Amacd1)
Ahist1= Amacd1-Asignal1
Amacd2= exponentialaverage[8](close)-exponentialaverage[55](close)
Asignal2= average[55,1](Amacd2)
Ahist2= Amacd2-Asignal2
Bmacd1= exponentialaverage[8](close)-exponentialaverage[89](close)
Bsignal1= average[89,1](Bmacd1)
Bhist1= Bmacd1-Bsignal1
Bmacd2= exponentialaverage[8](close)-exponentialaverage[144](close)
Bsignal2= average[144,1](Bmacd2)
Bhist2= Bmacd2-Bsignal2
Cmacd1= exponentialaverage[8](close)-exponentialaverage[233](close)
Csignal1= average[233,1](Cmacd1)
Chist1= Cmacd1-Csignal1
Cmacd2= exponentialaverage[8](close)-exponentialaverage[377](close)
Csignal2= average[377,1](Cmacd2)
Chist2= Cmacd2-Csignal2
C3 = Ahist1 > 0 and Ahist2 > 0 and Bhist1 > 0 and Bhist2 > 0 and Chist1 > 0 and Chist2 > 0
C4 = Ahist1 < 0 and Ahist2 < 0 and Bhist1 < 0 and Bhist2 < 0 and Chist1 < 0 and Chist2 < 0
SCREENER (C1 and (C3 or C4))
JSParticipant
Senior
Change the last line to:
Screener[C1 and (C3 or C4)]
what a stupid i am… Thank a ton for the help
JSParticipant
Senior
Positively, you will never make that mistake again… 🙂
This is still not working.. is it working for you when you changed it to [ ] JS
JSParticipant
Senior
When I change the last line, as indicated, I get results…
I am using this for forex. Its doesn’t give any results although i can see few forex satisfy conditions.. I will apply for stocks and see how it goes
Screeners (with IG) only support 256 lookback periods, so an SMA cannot exceed that number. EMAs need many more nunits to perform its calculations, so they are likely to begave correctly for about 70-80 lookback periods.
So 377 won’t work, unless you are using a premium version of the ProRealTime platform.
Thanks for this clarification. Is it possible to use prorealtime premium version with IG please? if yes how can i approach to get the same?
IG Italy used the Premium version for real accounts (I don’t have it any longer, though) and Complete version for demo accounts.
IG Switzerland use the Complete version only, for both real and demo accounts.
So… it depends on each local subsidiary.
I use IG UK real accounts. I raised a ticket with IG which they said passed to prorealtime team.. Hope this works..