[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Metastockusers] Weekly Indicators for Daily Charts



PureBytes Links

Trading Reference Links

Excellent, Roy, thanks very much for the explanations -- and for the almost instantaneous response. I'll take a closer look middle of this week and see if I can make it work. Best regards, Philip At 08:21 PM 3/12/2004, you wrote: Hi Philip The first thing to be aware of is that my weekly ADX is based on the following "ADX Raw" code. {MetaStock code written by Equis and published in the Oct99 TASC}   {ADX Raw} Periods:=Input("Enter time periods",1,100,10); PlusDM:=If(H>Ref(H,-1) AND L>=Ref(L,-1),H-Ref(H,-1), If(H>Ref(H,-1) AND LRef(L,-1)-L, H-Ref(H,-1),0)); DIPlus:=100*Wilders(PlusDM,Periods)/ATR(Periods); MinusDM:=If(LRef(H,-1) AND L Thank you very much, Roy. I'm especially interested in the weekly ADX. > > I'd like to build an expert on my daily charts with highlights or symbols identifying bars where BOTH weekly and daily adx are rising -- and the trend is up. Can you show me how to amend the weekly ADX to achieve this? Am I correct that the weekly ADX as you have it returns a true on the daily chart when the ADX rises but not for the duration of the week? Rather confused, sorry. Just be aware that the Weekly ADX uses PREV functions to create Wilders Smoothing within the indicator. This will add overheads to your expert that will be particularly noticeable when a large number of daily bars are loaded, say above 1000. Just something to be aware of. Of course if you reduce the number of daily bars too much your weekly values will be less accurate which is something of a "catch 22" situation. To convert my code to plot a ONE (true) when the weekly ADX is rising change the last line to turn it into a named variable from 100*If(ValueWhen(N+1,J,F)>0,F,F); to X:=100*If(ValueWhen(N+1,J,F)>0,F,F); then add the following line which tests the current value of the plot relative to the previous weeks value X>ValueWhen(2,J,X); The last two lines will now appear like this X:=100*If(ValueWhen(N+1,J,F)>0,F,F); X>ValueWhen(2,J,X); You can use this binary value and perform a similar test with the daily ADX() to verify that both daily and weekly are rising. Your usual trend indicator can also be added to the mix. > Am I correct that the weekly ADX as you have it returns a true on the daily chart when the ADX rises but not for the duration of the week? Rather confused, sorry. The weekly ADX (or any other weekly indicator for that matter) will plot a new value on a daily chart once the end of week is known, and it will hold that value until the completion of the next week. Try the indicators out and check out the various options. You will soon become familiar with when the plot changes and why. The "Display" mode has three options. Zero will update the indicator as soon as there is a verified Friday bar. This option will allow the indicator to update when the DayOfWeek()=5 AND the preceding bar also belongs to the current week. There is a good reason for having two bars in the current week and the explanation has to do with the possible makeup of contiguous weeks for thinly traded issues, short term suspensions, and other possible data gaps. One will update the indicator as soon as there is a verified Friday bar, and it will update the current weekly value with each new bar of the week. This means that the current week is dynamic and will change with each new daily bar until the Friday bar is added. This is consistent with the MetaStock display of weekly periodicy charts constructed from daily data. Two is the setting to use if back-testing. The indicator is not updated until the first bar of a new week is added. The current value of the indicator always shows the value as at the end of the previous week. These options are effectively disabled when plotted on a weekly chart but range of weekly indicators should exactly match the canned MS indicator on any weekly chart. All weekly indicators have a mechanism to detect if the chart is weekly periodicy. This forces every bar to be considered as a Friday or end-of-week bar. Hope this helps some. Roy Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/Metastockusers/   To unsubscribe from this group, send an email to: Metastockusers-unsubscribe@xxxxxxxxxxxxxxx   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/Metastockusers/  To unsubscribe from this group, send an email to:Metastockusers-unsubscribe@xxxxxxxxxxxxxxx  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.