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

[amibroker] Help request with code: William and Newbies like me



PureBytes Links

Trading Reference Links


William,

You wrote:

"Just in case anyone actually follows these threads...."

Ah yes, religiously right now.  It is the best place to see 
different snippets of code for some of less complicated code because 
a lot of the questions are from newbies to this program like I am.  

What I am doing, and an idea for people in my position, is I take 
every bit of code I see posted here that performs some task and I 
save it as a word file in its own directory.  Then, hopefully, when 
I have a problem in the future or a question, or want a look at some 
code to help me, I may be able to find it there.  It also allows me 
to revue it at my leasure to learn how it works.  Just an idea that 
I am using to try and creep up the learning curve.  Hope this can 
help others in my position.


--- In amibroker@xxxxxxxxxxxxxxx, William Peters 
<williampeters@xxxx> wrote:
> Just in case anyone actually follows these threads this is the 
solution to Teds
> question of a few days back. With the help of Marcin I was able to 
come
> up with this weekly formula:
> 
> WeeklyBase = TimeFrameCompress( C, inWeekly );
> SetForeign("!SPX");
> TimeFrameSet( inWeekly );
> RSEMA = EMA( ( WeeklyBase / C ) * 1000, 7 );
> RestorePriceArrays();
> RSEMA = TimeFrameExpand( RSEMA, inWeekly );
> Plot( RSEMA, " WEEKLY RSEMA", colorRed, 8 );
> 
> 
> which draws the same chart as this formula viewed with weekly 
display:
> 
> RS = RelStrength( "!SPX" );
> RS = EMA( RS, 7 );
> Plot( RS, "RS", colorRed, 8 );
> 
> 
> Regards,
> William Peters (AmiBroker Group Moderator)
> www.amitools.com
> 
> 
> 
> 
> Saturday, January 8, 2005, 4:21:57 PM, you wrote:
> 
> 
> 
> t> Thank you William for a quick responce to my problem.
> t> Unfortunately using your code also produces a different weekly 
chart
> t> than compared to when Daily/Weekly button is switched on the 
toolbar.
> 
> t> Regards Ted
> 
> 
> 
> t> --- In amibroker@xxxxxxxxxxxxxxx, William Peters 
> t> <williampeters@xxxx> wrote:
> >> Hi Ted,
> >> 
> >> You need to decompress the array to the base time interval 
before
> >> plotting weekly RS against lower timeframe.
> >> 
> >> TimeFrameSet( inWeekly );
> >> RS = EMA( RelStrength( "!SPX" ), 7 );
> >> TimeFrameRestore();
> >> 
> >> RS = TimeFrameExpand( RS, inWeekly );
> >> 
> >> Plot( RS, " WEEKLY  RS", colorRed, 8 );
> >> 
> >> There is a comprehensive time frame tutorial in the AMiBroker 
users
> >> guide in case you haven't seen it yet.
> >> 
> >> Regards,
> >> William Peters (AmiBroker Group Moderator)
> >> www.amitools.com
> >> 
> >> 
> >> Saturday, January 8, 2005, 8:27:09 AM, you wrote:
> >> 
> >> t> Hi 
> >> t> I am trying to plot weekly relative strength chart.
> >> t> The code below is producing identical chart to a daily RS 
chart.
> >> t> When switched D/W from toolbar charts differ. 
> >> 
> >> t> Am I missing something?
> >> 
> >> 
> >> t> TimeFrameSet( inWeekly );
> >> 
> >> t> RS=RelStrength("SP-500");
> >> t> Plot(EMA(RS,7)," WEEKLY  RS",colorred,8);
> >> 
> >> t> TimeFrameRestore();
> >> 
> >> t> Thanks 
> >> t> Regards Ted
> 
> 
> 
> 
> 
> 
> t> Check AmiBroker web page at:
> t> http://www.amibroker.com/
> 
> t> Check group FAQ at:
> t> http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> t> Yahoo! Groups Links





------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/