Hi.
A few weeks ago I created a stock screener on the daily close which screens for candles (D1) which are crossing the 20 days high (upper Donchian channel) or/and the VWAP. Somehow this simple screener doesn’t seemed to work. The stocks which are selected by the screener are a day (candle) too late. I don’t use the [1] condition anywhere in the screener. Can anybody help me out?
The code below is what I have done so far.
//Crossover HIGH or VWAP
//09/03/2020
//Marcel van Vliet
d=20
vw = volume*close
vwsum = SUMMATION[d](vw)
volsum = SUMMATION[d](volume)
VWAP = vwsum/volsum
Upper = HIGHEST[20](HIGH)
C1 = average[50]<VWAP
C2 = low<VWAP and close>VWAP
C3 = volume>average[20](volume)
C4 = average[50]<Upper
C5 = low<Upper and close>Upper
screener [(C1 and C2 and C3) or (C3 and C4 and C5)]
//Crossover HIGH or VWAP
//09/03/2020
//Marcel van Vliet
d=20
vw = volume*close
vwsum = SUMMATION[d](vw)
volsum = SUMMATION[d](volume)
VWAP = vwsum/volsum
Upper = HIGHEST[20](HIGH)
C1 = average[50]<VWAP
C2 = low<VWAP and close>VWAP
C3 = volume>average[20](volume)
C4 = average[50]<Upper
C5 = low<Upper and close>Upper
long=0
short=0
if C1 and C2 and C3 then
long=1
endif
if C3 and C4 and C5 then
short=1
endif
signal=0
if long=1 then
signal=1
endif
if short=1 then
signal=-1
endif
// code proscreener d'exemple
SCREENER[long or short](signal as "SIGNAL")
Tested in h1 it works.
It’s 1 day late if you scan stocks with an “end of day” account.
Hi Nicolas,
For this strategy I do not have acces to real-time data of US stocks, but I do have acces with the premium V11 version to real-time data of European stocks. The screener gives the same results with European stocks. Do I have to create two different screeners for each continent of stocks, or is there another way to make the screener work? This is a daily strategy so I don’t need real-time data for trading this strategy.
Could you provide an example of a late signal because I can’t find any.
Could you provide an example of a late signal because I can’t find any.
At this time this is correct. Stock prices are trading way under the VWAP.
It’s 1 day late if you scan stocks with an “end of day” account.
What is the logic of this?
I renders eod scans quite useless if this is correct?
Why useless?
Free eod access lets you use the platform for testing until you feel comfortable with it, so that you may sometime upgrade your subscription, it’s not intended for trading purposes.