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

[amibroker] Formula doesn't work on 15 minute chart



PureBytes Links

Trading Reference Links

I have a formula that works when I backtest using an EOD chart, but 
will not work when I use a 15 minute RT chart. Can anyone tell me why 
this happens? I am using it on gold futures for June. I am not a 
programmer as you can see by my formula.

The formula is;
_SECTION_BEGIN("strategy 4/27/07");


//size of order
SetPositionSize( 25, spsShares );
SetOption("MaxOpenPositions", 4);

//Buy order Conditions
Condition1=Cross(MACD(),Signal());
Condition1a=BarsSince(Condition1) <=7;
Condition1b=MACD() - Signal() >=.5;
Cond1=Condition1a AND Condition1b;

Condition2=Cross(StochK(),StochD());
Condition2a=BarsSince(Condition2) <=7;
Condition2b=StochK() - StochD() >=1;
Cond2=Condition2a AND Condition2b;

Cond4=Cond1 AND Cond2;
PositionSize= -25;



Buy=Cond4;

//Sell order
Condition11=Cross(Signal(),MACD());
Condition11a=BarsSince(Condition1) <=7;
Condition11b=MACD() < Signal();
Cond11=Condition11a AND Condition11b;

Condition12=Cross(StochD(),StochK());
Condition12a=BarsSince(Condition2) <=7;
Condition12b=StochD() > StochK();
Cond12=Condition12a AND Condition12b;

Cond14=Cond11 AND Cond12;


Sell = Cond14;

Short=Sell;
Cover=Buy;

Thank you,
Tom







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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/

<*> 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:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto: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/