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

[amibroker] Re: Loop help please!



PureBytes Links

Trading Reference Links


--- In amibroker@xxxxxxxxxxxxxxx, "pallmot" <palmot@xxxx> wrote:
[...]

Sorry, I don't have forex quotes in my database so I used 0.5 instead
of your 0.005 as difference to the low and forgot to change this.

> ---------------------------
> // 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;
> 
corrected:

 ApplyStop(stopTypeLoss,     stopModePoint, abs(BuyPrice - Ref(L, -1))
+ 0.005, 1, False, 0);

> ApplyStop(stopTypeProfit,   stopModeDisable, 0);
> ApplyStop(stopTypeTrailing, stopModeDisable, 0);
> ApplyStop(stopTypeNBar,     stopModeDisable, 0);
> 
> Equity(1);
> ----------------------------

Wolfgang





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/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/