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

Re: [amibroker] Rotationaltrading and Future Referencing?


  • Date: Sun, 13 Dec 2009 23:31:00 -0800 (PST)
  • From: i cs <ics4mer@xxxxxxxxxxxx>
  • Subject: Re: [amibroker] Rotationaltrading and Future Referencing?

PureBytes Links

Trading Reference Links



Thanks James,

I'll see if it fits!

RZ


From: James <jamesmemphis@xxxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Sun, 13 December, 2009 6:37:10 AM
Subject: Re: [amibroker] Rotationaltrading and Future Referencing?

 

This could take out future reference:
 
IIf( Ref(C,-1) > Ref(C,-2) AND Ref(C,-1) > C;
 
or take a look at this snippet I have used before:
 
PHigh = ( Ref (H, -2) >= Ref (H, -3) AND Ref (H, -2) >= Ref (H, -1) );
PHighPrice =
ValueWhen(Phigh, Ref(H,-2), 1
);
PLow = (
Ref (L, -2) <= Ref (L, -3) AND Ref (L, -2) <= Ref (L, -1
) );
PLowPrice =
ValueWhen(PLow, Ref(L,-2), 1
);


 


From: ics4mer <ics4mer@xxxxxx com.au>
To: amibroker@xxxxxxxxx ps.com
Sent: Sat, December 12, 2009 9:18:55 AM
Subject: [amibroker] Rotationaltrading and Future Referencing?

 


Hi,

Need some explanation as to what I'm doing wrong. I seem to be looking into the future but I'm not sure how! It has the effect of making "tommorrows" trade picks dissapear. Classic sign of looking into the future.

I've tried to avoid the usual pitfalls of the zig-zag related functions by writing my own "peak" function. This avoids percentages so I was hoping it would give a signal immediately, and not change later as Z-Z does. ( Yes, its a simple function that doesn't handle multiple days that close at the "peak", but thats OK for now. )

function Pk()
{
// There is a future referente at ref(C,1)
return IIf( C > Ref(C,-1) AND C > Ref(C,1), 1, 0 );
}

My position scoring code is where the problen lies - I think

PositionScore = IIf ( LIQUIDITY > LiquidityMin AND
C > ValueWhen(Pk( ),C,1),
10000 - StDev(C,stdDevPds) ,
0);

Near as I can figure, its the "C > ValueWhen" line and/or the Pk() function.

The following price sequence would give me the error:

10-11(p)-10( v)-12(C>) -11

11(P) is the peak,
10(v) is the validation of the peak, there has to be a down day
12(C>) is a close greater that the peak, the system generates a "buy on open signal" for the following day
11 is the next day, and when I back test at the end of this day, the signal is gone.

I suspect that it has something to do with the fact that the 12C> day is another peak.
I do have "add artificial future bar ticked" in the settings if that makes a difference.

I am a newbie, but the way I see it, that Pk() is a fixed point, and should not changeable by minor perturbations in the price.
Must have got something wrong. Any thoughts would be appreciated!

Thanks

Robert Z




See what's on at the movies in your area. Find out now.

__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





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

__,_._,___