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

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



PureBytes Links

Trading Reference Links

Hello,
 
I have not looked over all of your code...but...there possibly is a formula mistake in the Sell side.....as in..
//sell order
 
condition11a=barssince(condition1)<=7;...should it read barssince(Condition11)<=7;
 
also,
 
condition12a=barssince(condition2)<=7;...same fix here also,,,,,
 
Anthony
 
----- Original Message -----
Sent: Saturday, May 05, 2007 11:47 AM
Subject: [amibroker] Formula doesn't work on 15 minute chart

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




avast! Antivirus: Inbound message clean.

Virus Database (VPS): 000738-3, 05/05/2007
Tested on: 5/5/2007 11:52:37 AM
avast! - copyright (c) 1988-2007 ALWIL Software.


__._,_.___

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





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

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

__,_._,___