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

Re: [amibroker] simple Back Test



PureBytes Links

Trading Reference Links

Hi there again !

Nevermind, I befriended the F1 button and got everything sorted out 
( just a pitty there are not clear esamples with lots of the AFL 
functions...)

Regards,

Louw

--- In amibroker@xxxxxxxxxxxxxxx, "Louw-Roux Coetzer" 
<lcoetzer@xxxx> wrote:
> Hallo all :-)
> 
> I am trying to back test the concept of buying the High/Low break-
out of the
> previous day's price on a 15min chart such as the one below.  I 
have
> constructed the following formula, but something is clearly wrong 
with the
> results.
> 
> Sometimes it does buy at the break-out, but also just a bit 
before, see the
> graph for an example.  It is as if  the day end and beginning of 
the 15min
> chart does not coincide with the daily High/Low, I think !
> 
> The entry of the first green arrow is clearly wrong, although the 
second one
> is 100% correct.
> 
> If there is any one out there that has tried this before or can 
show me my
> error I would greatly appreciate it !!!
> 
> Kind regards,
> 
> Louw
> 
> The formula I am using:
> 
> TickSize=0.0001;
> TradeLong = H > TimeFrameGetPrice( "H", inDaily, -1 );
> TradeShort = L < TimeFrameGetPrice( "L", inDaily, -1 );
> BuyPrice= TimeFrameGetPrice( "H", inDaily, -1);
> ShortPrice = TimeFrameGetPrice( "L", inDaily, -1 );
> NumContracts = 1;
> PositionSize = NumContracts * MarginDeposit;
> PointValue =1;
> Buy = tradelong;
> Sell=0;
> Short = tradeshort;
> Cover=0;
> //ApplyStop( type, mode, amount, exitatstop, volatile = False, 
ReEntryDelay
> = 0 )
> ApplyStop( stopTypeProfit, stopModePoint, 0.0030, 1,False,20 );
> ApplyStop( stopTypeLoss, stopModePoint, 0.0027, True );



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/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/