The issue is not with Buy=H or not. It’s with the other signals. If what you say was correct, the system would buy the high of every candle, which does not. Thanks anyway. Still looking for answers.

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Fred
Sent: Saturday, October 14, 2006 14:45
To: [email protected]
Subject: [amibroker] Re: Help undestanding Arrays

 

Buy is like a light switch ... On or Off, it is NOT a methodology to
take action at a price ...

Buy = H ... Tells AB to Buy on EVERY BAR at the HIGH of that Bar ...
Why ? ... because BUY and H are arrays ...

Although incorrect ... If you had said ... Buy[i] = H[i]; ... The buy
would probably have occured on the bar you wanted it to i.e. the same
one where the cross occured ... but NOT at the High ... For Buys to
occur at specific points you need to use the BuyPrice Array ...

PS ... Buying at the H or L price of the current bar is never a good
idea because these are unknown until the bar is no longer current.

--- In [EMAIL PROTECTED]ps.com, "laster" <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Still trying to figure out working with Arrays, and it's apparent
there is
> something I am not getting.
>
> My understanding of the following is: If in the i bar the cross of
the MACD
> was true, then Buy at the High. However, Amibroker is buying in
several
> circumstances (including when the condition is true).
>
> Can somebody smarter than me please translate the following formula
into
> English so I can finally get it?
>
> Thanks a lot again,
>
> Jerry
>
>
>
>
>
> Reason= Cross( MACD(12,26), Signal(9) );
>
> for( i = 0; i < BarCount; i++ )
>
> {
>
> if (Reason[i] == True)
>
> {
>
> Buy = H;
>
> }
>
> }
>

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html






SPONSORED LINKS
Software support Small business finance Business finance online
Business finance training Business finance course

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to