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

RE: [amibroker] Re: Indicator to highlight above MA



PureBytes Links

Trading Reference Links

Gordon,

Do you intend to measure today vs tomorrow? If so, your
code is fine. 

If, however, you want to measure whether today is up or
down from yesterday, then you should replace 1 with -1 in
your REF() calls.

b
 
--- Gordon <amibroker@xxxxxxxxxxxxxx> wrote:
> I figure you have a couple of choices. 
> 
> One of the things I use is ATR(1) -- the avg. true range
> for one 
> period, or the true range between today and yesterday. I
> like to know 
> that number, and you can also simply use
> 
> (c - ref(c, 1))/ref(c, 1)
> 
> For part of my chart title, I include:
> 
> "ATR: " + NumToStr(ATR(1), 4.2) + " ( " + 
> 	NumToStr((C - Ref(C, -1)), 4.2) + " / " +
> 	NumToStr((((C - Ref(C, -1)) / Ref(C, -1)) * 100), 2.1) +
> 
> 	"% )
> 
> It's a snippet, so look out for unbalanced parantheses,
> quotes, etc.
> 
> Gordon
> --- In amibroker@xxxxxxxxxxxxxxx, "nb9trade" <clyde@xxxx>
> wrote:
> > Is there a built in function for % change from one day
> to the next?
> > 
> > What code would be used to designate the previous days
> close, high 
> > low or last etc.?
> > 
> > Thanks
> > 
> > Clyde
> 
> 


__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
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/