Hi all, I am using someone elses script. I want to add a function to allow me to not see symbols that I have reviewed and no longer want to see time after time each morining, this would require a means for me to tell the script here are the symbols, that if returned by the scan, skip them and move to the next.
Example, NBY and ZOM show up, I look, decide I do not want to see them anymore today, so I enter them somewhere and they are skipped
One way I figured to provide a means for data input would be to builde a watchlist, call it IGNORE_THESE and enter NBY and ZOM there, then when the scan runs, if it sees either of these returned AND in the watchlist, it skips them and goes to whatever the next symbol is that meets the scan.
I am using the following code and figured whatever needs to be added to so this can just be inserted here, I know lots of VBA but have zero exp on TOS script
any help is appreciated, thanks
#Wizard text: The
#Wizard input: price
#Wizard text: has moved
#Wizard input: operator
#Wizard input: percent_change
#Wizard text: % in after hours trading
input closing_time = 1559;
input open_time = 0930;
input price = close;
input operator = {default "greater than","less than"};
input percent_change = 1.00;
def time_until_close = SecondsTillTime(closing_time);
def time_until_open = SecondsTillTime(open_time);
def closing_bell = time_until_close == 0;
rec closing_price = CompoundValue(1, if closing_bell then price else closing_price[1], price);
def after_closing_bell = time_until_close <= 0;
def before_opening_bell = time_until_open >= 0 ;
def afterhours_percent_change = 100 * (price / closing_price - 1);
def meet_scan_criteria;
switch (operator) {
case "greater than":
meet_scan_criteria = afterhours_percent_change >= percent_change;
case "less than":
meet_scan_criteria = afterhours_percent_change <= percent_change;
}
plot scan = (after_closing_bell or before_opening_bell) AND meet_scan_criteria;
Example, NBY and ZOM show up, I look, decide I do not want to see them anymore today, so I enter them somewhere and they are skipped
One way I figured to provide a means for data input would be to builde a watchlist, call it IGNORE_THESE and enter NBY and ZOM there, then when the scan runs, if it sees either of these returned AND in the watchlist, it skips them and goes to whatever the next symbol is that meets the scan.
I am using the following code and figured whatever needs to be added to so this can just be inserted here, I know lots of VBA but have zero exp on TOS script
any help is appreciated, thanks
#Wizard text: The
#Wizard input: price
#Wizard text: has moved
#Wizard input: operator
#Wizard input: percent_change
#Wizard text: % in after hours trading
input closing_time = 1559;
input open_time = 0930;
input price = close;
input operator = {default "greater than","less than"};
input percent_change = 1.00;
def time_until_close = SecondsTillTime(closing_time);
def time_until_open = SecondsTillTime(open_time);
def closing_bell = time_until_close == 0;
rec closing_price = CompoundValue(1, if closing_bell then price else closing_price[1], price);
def after_closing_bell = time_until_close <= 0;
def before_opening_bell = time_until_open >= 0 ;
def afterhours_percent_change = 100 * (price / closing_price - 1);
def meet_scan_criteria;
switch (operator) {
case "greater than":
meet_scan_criteria = afterhours_percent_change >= percent_change;
case "less than":
meet_scan_criteria = afterhours_percent_change <= percent_change;
}
plot scan = (after_closing_bell or before_opening_bell) AND meet_scan_criteria;