I am trying to explore stocks that have grown in relative strength over a given period. Currently it is set to 5 periods.
When i run the exploration on a particular date, say 14-06-21; some of the results are not correct,
Example: for one stock, BEL.NS
WMA today is 11.336
WMA T-LB Periods IS 10.345
But on the chart the value is never 10.345.
Parameters in the exploration and WMA periods in the indicator are both 22 periods.
// Explore stocks with positive relative strength. RS = RelStrength( "Nifty 500", 1 ); // Calculate WMA for relative strength, slope of this line is the trend of RS WMA_Periods = Param( "RelStre WMA", 22, 20, 55, 1 ); // Choose lookback period over which WMA of RS will be compared Lookback_Periods = Param( "Lookback Periods", 5, 2, 100, 1 ); WMA_Value = WMA( RS, WMA_Periods ); list_num = GetOption( "FilterIncludeWatchlist" ); category = categoryWatchlist; list_name = CategoryGetName( category, list_num ); //Diff = WMA_Value - Ref(WMA_Value, -Lookback_Periods); // Filter conditions // Volume Condition, VC = V > 1000000 ; // Price Condition, greater than 10 only. PC = C > 10; //WMA Condition, stronger over Lookback_Periods periods WC = WMA_Value > Ref( WMA_Value, -Lookback_Periods ); Filter = VC AND PC AND WC AND WMA_Value > 10; AddColumn( Ref( WMA_Value, -Lookback_Periods ), "WMA T-LB Periods", 1.3 ); AddColumn( WMA_Value, "WMA Today", 1.3 ); //AddColumn( C, "Close", 1 ); //AddTextColumn( list_name, "list_name", 1 );