PureBytes Links
Trading Reference Links
|
--- In amibroker@xxxxxxxxxxxxxxx, "Beachie" <beachie41@xxxx> wrote:
[...]
> An my comment still stands, this is overly complicated for such a
simple & basic
> requirement of being able to compare, while the current Buy is valid
, succeeding prices
> against the OHLC of the entry bar *without* new buy signals skewing
the backtests.
[...]
Here is the non loop version. I wouldn't say that this is 'overly
complicated' ;-)
---------------------------
// this code works only with the backtester as expected
// check out the documention about equity() especially TJs comments
SetTradeDelays(1, 1, 1, 1);
SetOption("AllowSameBarExit", True);
SetOption("ActivateStopsImmediately", True);
Buy = Ref(H, -2) > Ref(H, -3) AND Ref(H, -3) > Ref(H, -4);
Sell = 0;
ApplyStop(stopTypeLoss, stopModePoint, abs(BuyPrice - Ref(L, -1))
+ 0.5, 1, False, 0);
ApplyStop(stopTypeProfit, stopModeDisable, 0);
ApplyStop(stopTypeTrailing, stopModeDisable, 0);
ApplyStop(stopTypeNBar, stopModeDisable, 0);
Equity(1);
----------------------------
Wolfgang
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/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/
|