Montevideo
Posts: 1 since Feb 2020
Thanks Given: 0
Thanks Received: 0
|
Im a beginner with scripts and Ive been following what you guys are doing here for a while. Its amazing, really awesome ideas.
Im trying to create a very basic scanner for premarket which includes a study and alerts when the condition is met, but I get some errors.
I want to scan for stocks between 1 and 7 making 20k or more volume in the 1-min bars. I want to catch volume spikes of that kind. All the volume alerts I see are related to percentage.
Im getting hundreds of alerts all day long. Its driving me crazy! I need the alerts to stop at 9:30, market open time.
So, I want to set:
A time limit for the alert.
A volume value equal or higher than 20K adding that as a stock filter study for that scan.
Later I will select Alert me when results change to get the alerts.
So, this is what I have tried:
-
def afterStart = SecondsFromTime(700) > 0;
def beforeEnd = SecondsTillTime(930) > 0;
def conditionTrue = volume >= 23000
plot alert = afterStart and beforeEnd and conditionTrue;
UNUSUALVOLUME() is greater than or equal to 23000
Also trying, but apparently Im not using the Unusual Volume condition in the right way because I get an error of invalid statement.
I also tried, with similar results:
-
input ORBegin = 700;
input OREnd = 930;
Def ORActive = if secondstilltime(OREnd)>0 AND secondstillTime(ORBegin)<=0 then 1 else 0;
Thanks so much!
|