PureBytes Links
Trading Reference Links
|
Hi Bruiser,
Based on your description and accompanying code, this
is what I put together. Doesn't generate many trades,
and of the trades it does take they are pretty ugly.
Regards,
Gary
PositionSize = -10;
Condition1 = Cross(H, Ref(HHV(H, 10), -1));
Condition2 = H > EMA(C, 40);
Condition3 = H == HHV(H, 70);
LiquidityOK = MA(V * C, 21) > 500000;
CloseOK = C < 10;
UpBar = C > O;
BuyCondition = Condition1 AND Condition2 AND
Condition3 AND
LiquidityOK AND CloseOK AND UpBar;
SellCondition = Cross(Ref(MA(L,180), -1), C);
BuyState = Flip(BuyCondition, SellCondition);
SellState = NOT BuyState;
Buy = ExRem(BuyState, SellState);
Sell = ExRem(SellState, BuyState);
ApplyStop(stopTypeLoss, stopModePercent, 10.0, 1,
False, 0);
Filter = 1;
AddColumn(BuyState, "BuyState", 5.0);
AddColumn(Buy, "Buy", 5.0);
--- bruiserbbq <bruiserbbq@xxxxxxxxxxxx> wrote:
> Hi gang, I would like to backtest a trend
> trading/breakout
> system....but the code I have is in Metastock. I
> would prefer to
> backtest the system in AB (of course) as I'm led to
> believe that the
> Metastock tester leaves a lot to be desired. So with
> that
> said...here's the Metastock code and the system
> explanation.
>
>
> ENTRY Exploration:
> Cross(H,Ref(HHV(H,10),-1)) AND H > Mov(C,40,E) AND
> HHVBars(H,70)=0
> AND Fml("Liquidity") > 500000 AND C < 10.00 AND C >
> O
>
> IN INDICATOR BUILDER
> name it Liquidity
> Mov(V * C,21,S)
>
> EXIT
> Cross(Ref(Mov(L,180,E),-1),C)
>
>
> In English.
> (1) Cross(H,Ref(HHV(H,10),-1)) When todays high
> crosses the last
> Highest High over the last 10 periods AND
> (2) H > Mov(C,40,E)The high is greater than the 40
> day exponential
> Moving Average AND
> (3) HHVBars(H,70)=0 Todays high is the highest
> high for 70periods
> AND
> (4) Fml("Liquidity") > 500000 The $ value of
> trading in the Share
> is greater than $500K AND
> (5) C < 10.00 The close is less than $10 AND
> (6) C > O. The close is higher than the open.
>
>
> Hope someone can convert this for me, as I still
> can't get the grasp
> of this coding lerk!
>
> Cheers dumb ol'Bruiser
>
>
>
>
>
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
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/
|