hello,

just to answer myself: i dont need CBT for ATR-based
positionsizing/initial-stops ala vanTharp. Here is what i got and what
seems to work at first glance (just checked a few trades):



SetOption("InitialEquity", 100000);
SetOption("AllowSameBarExit", True);
SetOption("ActivateStopsImmediately", False);
SetOption("FuturesMode", True);

stopamount = 1.5*ATR(12);
stopround = (round(stopamount*10000))/10000;

RoundLotSize = 1;
TickSize = 0.0001;
PointValue = 100000;
MarginDeposit = 1000;

// risk 2% of equity considering the initial-SL
PositionSize = -2 * (1/(stopround*PointValue*MarginDeposit*0.000001));

Buy = Cross( Close, EMA( Close, 45 ) );
Sell = Cross( EMA( Close, 45 ), Close );
Short = Cover = 0;

ApplyStop(stopTypeLoss, stopModePoint, stopround, 1, False);



Ticksize/Pointvalue etc. is set for the forex-market.

Now if i could add a custom metric for Initial Stoploss in Pips and
profit/loss expressed in initial-risk-multiples that would be nice.
But as far as i can see it isnt possible, because i cannot use my
stopamount-array in the CBT-interface. Seems i also cant retrieve the
initial-stop from the trade-object. If anyone knows a way to do that,
any hint would be appreciated.

Andy





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 other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS




Reply via email to