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

[amibroker] Rotationaltrading and Future Referencing?


  • Date: Sat, 12 Dec 2009 15:18:55 -0000
  • From: "ics4mer" <ics4mer@xxxxxxxxxxxx>
  • Subject: [amibroker] Rotationaltrading and Future Referencing?

PureBytes Links

Trading Reference Links

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






------------------------------------

**** 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/

Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/