Greetings all
Firstly… Thanks to the community for joint education/support/assistance. This is a collection of snippets from all over but mainly working with Nicholas’ ASC Trend indicator.
I’ve been looking into creating a screener for the ASC Trend (Arrows) as I seem to miss a few when working on the lower timeframes. I’ve an issue on line 62 character 71 (according to the error message) and may have been staring at it too long to work out why I can’t get it working.
The Trend bar is to determine a bias. This is used within my strategy (with discretion/analysis). So the market is either long or short. Then wait for an arrow to show up and you’re away.
I’ve created the screener to deliver the activations in minutes, to show the timeframe they’re appearing within and they can be modified depending on the TFs you trade. (included all for this)
Any assistance appreciated
//TREND BAR
EMA20 = ExponentialAverage[20](close)
EMA50 = ExponentialAverage[50](close)
EMA100 = ExponentialAverage[100](close)
// ================
LONG = EMA20 > EMA50 AND EMA20 > EMA100
SHORT = EMA20 < EMA50 AND EMA20 < EMA100
// ================
//ARROWS
RISK = 1 //RISK setting of the ASCtrend indicator
// ================
buysig, sellsig = CALL "ASCtrend indi comp strategy"[RISK]
//graph buysig coloured(0,200,0)
//graph sellsig coloured(200,0,0)
Timeframe (Daily)
c1 = LONG AND buysig
c2 = SHORT AND sellsig
Timeframe (4 Hour)
c3 = LONG AND buysig
c4 = SHORT AND sellsig
Timeframe (1 Hour)
c5 = LONG AND buysig
c6 = SHORT AND sellsig
Timeframe (15 Minute)
c7 = LONG AND buysig
c8 = SHORT AND sellsig
Timeframe (5 Minute)
c9 = LONG AND buysig
c10 = SHORT AND sellsig
Timeframe (1 Minute)
c11 = LONG AND buysig
c12 = SHORT AND sellsig
// CONCLUSION
x=0
if c11 then
x=1
elsif c12 then
x=-1
elsif c9 then
x=5
elsif c10 then
x=-5
elsif c7 then
x=15
elsif c8 then
x=-15
elsif c5 then
x=60
elsif c6 then
x=-60
elsif c3 then
x=240
elsif c4 then
x=-240
elsif c1 then
x=24
elsif c2 then
x=-24
endif
SCREENER[x] (x as "TIMEFRAME")
Line 62 looks correct. It may be due to something else.
Your screener uses 7 TF’s (6 + default).
I don’t know about limits for ProScreener, but ProOrder only allows 6 TF’s at most (5 + default).
Actually if the default TF is the same as one of those coded, it shouldn’t count.
Try removing one.
Thanks Roberto
I had a play with doing that, however, I think the problem may live in the “Called Code” that I’m effectively using blind in my code modification? I tried removing a timeframe, that didn’t work, and even when shortened (so that the line didn’t exist), it still showed that error in the same place. Making me think it refers to the Strategy code, when trying to use it within the screener.
I’ll keep working on it anyway… Never give up; never surrender!!!
Try embedding the indicator in your code to avoid CALLing it.
That could work it out.
DO NOT double post, as clearly highlighted in yellow below. I deleted it.
Now that I have seen the link to the indicator (https://www.prorealcode.com/prorealtime-indicators/asctrend/) I can tell you it can’t be used with screeners as it uses ARRAYS which are currently not supported by ProScreener.
As far as I know a new version of ProScreener is in the pipe and should be available in some months, maybe before the end of the year.