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

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



PureBytes Links

Trading Reference Links

Hi Tom,

It works fine here, but only if I unmark the Condition1b.
As far as I see the Value is to high.

Cond1=Condition1a;// AND Condition1b;

Thomas
www.patternexplorer.com


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of professor77747
Sent: Saturday, May 05, 2007 6:33 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Formula doesn't work on 15 minute chart

Thank you for your help. I made the corrections, but it still will 
not work on a 15 minute RT chart. It will just work on a EOD chart.

Tom

--- In amibroker@xxxxxxxxxxxxxxx, "Anthony Faragasso" <ajf1111@xxx> 
wrote:
>
> 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 ----- 
> From: professor77747 
> To: amibroker@xxxxxxxxxxxxxxx 
> 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
 
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/