Get scan results when ANY conditions are met

Nick

Active member
2019 Donor
VIP
Hi, i received an error message when creating this scan, it stated "Exactly One plot expected",
Request assistance on how should i write the script that tells the scanner to show me the list of stocks when ANY of the conditions. Thanks

Code:
def BaseMA = SimpleMovingAvg(close, 65);
def BaseMA2 = SimpleMovingAvg(close, 34);

def Upperband = BaseMA * 1.05;
def Upperband2 = BaseMA2 * 1.05;
def Momo= Average(close, 7);

plot Start6 = Momo crosses above Upperband;
addChartBubble(Start6,open,"6", color.white);

plot Start3 = Momo crosses above Upperband2;
addChartBubble(Start3,open,"3", color.orange);
 

Nick

Active member
2019 Donor
VIP
@XeoNoX Thanks for your reply. I have changed the codes but the scan plot combines both conditions to get the scan results, which is not what i am looking for. What i would like to see is for the scan to provide scan results when ANY of the two conditions are met.

def BaseMA = SimpleMovingAvg(close, 65);
def BaseMA2 = SimpleMovingAvg(close, 34);

def Upperband = BaseMA * 1.05;
def Upperband2 = BaseMA2 * 1.05;
def Momo= Average(close, 7);

def condition1 = Momo crosses above Upperband;
def condition2 = Momo crosses above Upperband2;

plot scan = condition1 and condition2;
 

Similar threads

Top