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

Re:[amibroker] Re: Loop help please!



PureBytes Links

Trading Reference Links

Thanks to both Terry & yourself. Both options worked. Never realized there was so many 
ways to skin a cat :)
Perhaps I've been labouring under the misapprehension that loops were needed to "hold" a 
price that would not be over written by a new Buy signal being generated while the 
original Buy signal was still current.
Thanks once again for your help.
cheers

----- Original Message ----- 
From: "pallmot" <palmot@xxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, November 08, 2004 2:19 AM
Subject: [trading] [amibroker] Re: Loop help please!


>
>
> --- 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
>
>
>
>
>
>
> 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
>
>
>
>
>
>
>
>
> 




------------------------ 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/