![]() ![]() I am missing something there as same issue had arisen in the AddToComposite quotes. ![]() While the difference is not big in latest quotes, It's substantial in older quotes Plot(pcnt_BelowMA, titles, VarGet(StrExtract(colors,i)), styleThick) ĪddColumn(Stocks_BelowMA,"Count-"+periods,1.0) ĪddColumn(pcnt_BelowMA,"Percent"+periods,1.2) Exponential Moving Average - EMA: An exponential moving average (EMA) is a type of moving average that is similar to a simple moving average, except that more weight is given to the latest data. The second code I modified for stocks below the MA /// Set symbol list in Analysis Filter - Include Plot(pcnt_aboveMA, titles, VarGet(StrExtract(colors,i)), styleThick) ĪddColumn(Stocks_aboveMA,"Count+"+periods,1.0) ĪddColumn(pcnt_aboveMA,"Percent"+periods,1.2) When the stock price trades above its average price, it means the traders. Periods = MxFromString("") // MA periodsįor ( i = 0 i = MA(C, periods), True, persist) įor ( i = 0 i %g-day MA", periods) Though both SMA and EMA are for a 50 day period, you can notice that the EMA. / by and = CategoryGetName(categoryGroup, 5) / Set Periodicity in analysis General settings Code 1 is for stocks above the MA /// Set symbol list in Analysis Filter - Include I bifurcated the code in two parts for cross check. In theory, the direction of the moving average (higher, lower or flat) indicates the trend of the market. The difference is more pronounced when I am utilising the longer term average (200 DMA). For the major indices on the site, this widget shows the percentage of stocks contained in the index that are above their 20-Day, 50-Day, 100-Day, 150-Day, and 200-Day Moving Averages. However the total number of symbols don't seem to match as I go into older dates. Whether it has to do with the flags, am bit perplexed So there seems to be something wrong out there. The sample of Watchlist is list of Top 500 stocks in Indian Equities and therefore possibility of new listings within the space is that much difficult. Issue is the Total Number of stocks (CloseTotal = CloseF1 + CloseF2) seems to be varying with dates. Graph3=Plot(C,"Close",colorBlack,styleCandle) Graph2=Plot(CloseTotal, "Adv-Dec Line", colorBlack, styleDots) Graph1=Plot(CloseF2, "Dec Line", colorRed, styleThick) Graph0=Plot(CloseF1, "Adv Line", colorGreen, styleThick) _N(Title = StrFormat("", O, H, L, C, SelectedValue( ROC( C, 1 ) ) )) CloseTotal = CloseF1 + CloseF2 +CloseF3 if( InWatchListName("NSE - NIFTY 500") AND Name()!="NIFTY 500" ) AddToComposite(C=MA50,"~NSE - NIFTY 500 At MA50","X",flags = atcFlagDefaults) If( InWatchListName("NSE - NIFTY 500") AND Name()!="NIFTY 500" ) AddToComposite(CMA50,"~NSE - NIFTY 500 Above MA50","X",flags = atcFlagDefaults) The afl is as follows: _SECTION_BEGIN("Advance Decline Line 500") I am crating a composite to check number of stocks in a watchlist "NIFTY 500" which are above and below their 50 DMA. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |