I’m using the following script to scan for 50MA is above 150MA and 200MA and 150MA is above 200MA (50MA is above 150MA is above 200MA).
//Set MA variables
MA1 = MA(BARS=50, CALC=Close);
MA2 = MA(BARS=150, CALC=Close);
MA3 = MA(BARS=200, CALC=Close);
//50MA is above 150MA and 200MA and 150MA is above 200MA
(MA1>MA2) and (MA1>MA3) and (MA2>MA3)
I’ve tried various combinations such as MA1>MA2>MA3 or V1=(MA1>MA2); V2=(MA2>MA3); V1 and V2.
However the various scans produce a watchlist with a small percentage of erroneous results with MA1 being below MA2 or MA3 or below both MA2 and MA3
Thanks Tim - the formula is correct. Can you give an example of an error?
It’s probably a difference between the MA criteria in the script versus the MAs on the chart. For example, are the MAs on the chart set to use the closing price as per the formula?
When scanning on Last Week it will return all true results that have occurred during that time. On March 17th the conditions were true for CHN, which is why it’s in the results.
If you scan on the Last Bar instead of Last Week you will get only those that are currently true.