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

Re: [amibroker] Re: Kicker code



PureBytes Links

Trading Reference Links

Jacques,

It is saying "set each element in the sell array to be equal to whatever the 
buy array is 10 days before".

Look at it this way - Buy and Sell are both arrays, with one element for 
each data bar. Most elements of these arrays contain the number zero 
(signifying no buy or sell signals on that bar). When there is a buy or sell 
signal on a certain bar, then the Buy or Sell array will contain something 
other than zero for that bar. It is usually "1", but different types of 
stops will return different numbers so you can tell how you got stopped out. 
So, if you want to exit each postion 10 bars after the buy, then "sell = 
ref( buy, -10 )" will create a sell signal today if there was a buy signal 
10 bars ago by copying the buy signal from 10 days ago into the sell array 
for today. If there was no buy signal 10 days ago (Buy  = 0), then it will 
just copy the zero.

Steve

----- Original Message ----- 
From: "jacquesmmathieu" <jacquesmmathieu@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, June 21, 2005 11:47 AM
Subject: [amibroker] Re: Kicker code


> Thanks a lot for everyone's help. Results are much better now,
> especially since it's looking back, not forward! LOL! I guess what
> gets me confused is this statement that someone showed me to use:
>
> Buy = ExRemSpan( Buy, 10 );
> Sell = Ref( Buy, -10 );
>
> This eliminates excessive buy signals and sells automatically after
> 10 days. I don't really understand what the syntax here is. Why is
> the sell signal using a -10 instead of a +10? It works, but to me it
> seems like its saying sell 10 days ago instead of ten days in the
> future. Can anyone clarify? I suck at programming, but I'm getting
> better!
>
> Thanks,
>
> Jacques
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Steve Dugas" <sjdugas@xxxx> wrote:
>> Hi,
>>
>> I don't know what a "kicker" is, but your Buy statement references
>> tomorrow's data - that can't be right, can it? Maybe if you posted
> in
>> English what the formula should do...
>>
>> Steve
>>
>> ----- Original Message ----- 
>> From: "jacquesmmathieu" <jacquesmmathieu@xxxx>
>> To: <amibroker@xxxxxxxxxxxxxxx>
>> Sent: Tuesday, June 21, 2005 9:30 AM
>> Subject: [amibroker] Kicker code
>>
>>
>> >I was just reading the latest issue of Active Trader when I saw
> the
>> > article on candlesticks and how kickers were the most powerful
> trading
>> > symbols. Anyway I tried coding a buy signal for a kicker and I
> got
>> > horrible results. Can anyone look at my code and tell me how I
> could
>> > improve it, or even if it is correct?
>> >
>> > Thanks,
>> >
>> > Jacques
>> >
>> > Buy = Ref(Close, 1)*1.01 < Ref(Open, 1) AND Open > Ref(Open, 1)
> AND
>> > Open*1.01 < Close;
>> > Buy = ExRemSpan( Buy, 5 );
>> > Sell = Ref( Buy, -5 );
>> >
>> > I put in the coefficients after the first attempt. I tried using
>> > different percent moves, so the one percent isn't fixed.
>> >
>> >
>> >
>> >
>> > 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
>> >
>> >
>> > Yahoo! Groups Links
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>
>
>
>
>
> 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
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
> 




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

 
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/