Yesterday's close is greater or lower from today's last price intraday
Author: hmg2020
Creation Date: 12/6/2019 7:22 PM
profile picture

hmg2020

#1
I am writing a very simple program to get a list of stocks if yesterdays close is greater or lower by a set amount (%) from todays last price during the day..What I have so far gives me nothing... Can someone please help...

CODE:
Please log in to see this code.


Thanks
profile picture

Eugene

#2
So are you writing a screener (WS Programming Guide > Techniques > Creating a screener) or a strategy for trading/backtesting?

Is this for intraday bars or for Daily?

profile picture

hmg2020

#3
A screener on the daily price throughout the day and after close. But I only know how to get the alerts using Strategy Monitor which I think is easier to use on the side.
profile picture

Cone

#4
You could automatically, and periodically, get a list every x minutes by using intraday data. But since you specified a Daily bar scale, this assumes that your Daily data are updated when requested throughout the day.

Run this on the DataSet like a multi-symbol backtest (MSB) and you'll get the list in the debug window. You could also easily write the result to a file.
CODE:
Please log in to see this code.
profile picture

Eugene

#5
QUOTE:
But since you specified a Daily bar scale, this assumes that your Daily data are updated when requested throughout the day.

I wonder how he can make it using Fidelity EOD data only - without resorting to workarounds like a) access intraday data from Daily or b) using Yahoo! provider's "Always return data with Partial Bar"?
profile picture

hmg2020

#6
Cone, I think this will work,

CODE:
Please log in to see this code.


but I want to run the srceener for a whole DATASET and print only the SYMBOL...
Currently It only works for one symbol...
profile picture

Eugene

#7
QUOTE:
Currently It only works for one symbol...

What you're saying is wrong. With "PrintDebug(Bars.Symbol);" or as is, Cone's code runs in Multi-Symbol Backtest mode.
profile picture

hmg2020

#8
This is working better now (Thank you Cone and Eugene), I just wish I could display 3 separate PrintDebug windows.
profile picture

Eugene

#9
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).