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

[amibroker] Re: How to code this strategy ?


  • Date: Fri, 11 Dec 2009 15:02:40 -0000
  • From: "pierre8rou" <pierre8r-gy@xxxxxxxx>
  • Subject: [amibroker] Re: How to code this strategy ?

PureBytes Links

Trading Reference Links

Hello,

I have slightly change the code to :


Buy[0] = 1;
Sell = 0;
Short = 0;
Cover = 0;
Cnt = 0;

for ( i = 1; i < BarCount; i ++ )
{
    Cnt++;

    if ( Cnt == 8 )
        Sell[i] = 1;

    if ( Cnt == 13 )
        Short[i] = 1;

    if ( Cnt == 19 )
        Cover[i] = 1;

    if ( Cnt == 27 )
    {
        Cnt = 0;
        Buy[i] = 1;
    }


}

Plot ( C, "", colorBlack, styleCandle );


I start from the 01/06/2009 but the first trade is the 10/06/2009 why ??

Ticker,Trade,Date,Price,Ex. date,Ex. Price,% chg,Profit,% Profit,Shares,Position value,Cum. Profit,# bars,Profit/bar,MAE,MFE,Scale In/Out,
GOOG,Long,10/06/2009,436.23,18/06/2009,415.68,-4.71%,-471.08,-4.71%,22.9237,10000.00,-471.08,7,-67.30,-5.66%,0.38%,0/0
GOOG,Short,29/06/2009,426,13/07/2009,416.17,-2.31%,219.88,2.31%,22.3684,9528.92,-251.20,10,21.99,-0.42%,7.05%,0/0
GOOG,Long,24/07/2009,435.81,03/08/2009,448.74,2.97%,289.24,2.97%,22.3694,9748.80,38.04,7,41.32,-0.90%,3.88%,0/0
GOOG,Short,12/08/2009,455.41,25/08/2009,469.13,3.01%,-302.41,-3.01%,22.0418,10038.04,-264.38,10,-30.24,-3.22%,3.70%,0/0
GOOG,Long,08/09/2009,464.29,16/09/2009,479.8,3.34%,325.23,3.34%,20.9688,9735.62,60.85,7,46.46,-1.82%,3.34%,0/0
GOOG,Short,25/09/2009,494.29,08/10/2009,519.57,5.11%,-514.55,-5.11%,20.3541,10060.85,-453.70,10,-51.46,-5.11%,2.37%,0/0
GOOG,Long,21/10/2009,549.91,29/10/2009,543.01,-1.25%,-119.78,-1.25%,17.3597,9546.30,-573.49,7,-17.11,-2.12%,2.13%,0/0











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

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