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

[amibroker] future bar



PureBytes Links

Trading Reference Links

hi,

I added a simple system below where I put some this code inside:

Buy = Ref(Buy,-1);
Short = Ref(Short,-1);
Buy = Ref(Buy,1);
Short = Ref(Short,1);

Although it doesn't make sense putting it like this, in my system I use this (not in this form though). The point is that putting this piece of code inside the system has no effect on the future bar. The portfolio backtest can still predict the proper things to buy or short in the future bar.

My point is that any buy or short signal in the last bar is removed due to this procedure. Still it doesn't seem to matter if one includes this code or not.

Anyone understand how this works?

rgds, Ed









SetBarsRequired(10000,10000);
SetOption("MaxOpenPositions", 250 ); 
PositionSize = -20;
SetTradeDelays(1,1,1,1);

Buy = RSI(14) < 30;
Short = RSI(14) > 70;

BuyPrice = Open;
ShortPrice = Open;

Buy = Ref(Buy,-1);
Short = Ref(Short,-1);
Buy = Ref(Buy,1);
Short = Ref(Short,1);

Sell = 0;
Cover = 0;

ApplyStop( stopTypeNBar,stopModeBars,5,ExitAtStop = 1,Volatile = False, ReentryDelay = 1 );

SellPrice = C;
CoverPrice = C;

Equity(1);

PositionScore = 50-StochK(14); 

[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

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/