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

Re: [amibroker] Manual Stop help, Please



PureBytes Links

Trading Reference Links

You must use a For Loop to control the stops value and the buy/sells
unless the buy and sell are mutually exclusive eg use same inverse
conditions like cross of MACD and Signal line.

--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm


On 12/31/05, moneypro <protrader0668@xxxxxxxxx> wrote:
> I have the following code:
>
> BuySetup = condition1
> BuyStop = ValueWhen(BuyStop,H);
> Buy = Cross(H,BuyStop);
>
> SellStop = ValueWhen(Buy,L);
> Sell = Cross(Sellstop,L);
>
> Exrem(buy,sell);
> Exrem(Sell,buy);
> BuyPrice = max( BuyStop, Low );
> SellPrice = min( SellStop, High );
>
> All goes well with a "Long" entry after Condition1, with fixed stop at
> Low of that bar. Then another Condition1 shows up before this position
> is closed. Because of (SellStop = ValueWhen(buy,L); ) , another "Buy"
> causes SellStop to be reset at a higher level. All I want to do is to
> keep it at the original level until I get stopped out or close it
> after n bars. I've searched both yahoo group and
> AmiBroker boards, couldn't find an answer. Thanks
>
>
>
>
>
>
>
>
> 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
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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

 
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/