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

[amibroker] Re: ApplyStop question



PureBytes Links

Trading Reference Links

Hi,mates.I'm going crazy about a problem that troubles al my TS.

System

Buy = Cross( RSI(14), 30 );
Sell = Cross( 70, RSI(14) );
BuyPrice=O*0.9705;//Buy when the stock goes down -2.95% from Open.
SetTradeDelays(0,0,0,0);
ApplyStop(stopTypeLoss,stopModePercent,2.15,1);
ApplyStop(stopTypeProfit,stopModePercent,3,1);

Objective

I'd like to buy the stock all the days it goes down till about -2.95 
% from open.
I'd like to sell when Sell = Cross( 70, RSI(14) ) occurs or when i 
can take profit about 3% from Buyprice.

Troubles

No trouble about Buy.It works perfectly.Sell instead has its logic 
but there's a wrong situation when it's a black candle day.
i.d  O 2.42 H 2.42 L 2.32 C 2.32 What happens here?
Naturally I buy at 2.35 and IN THE SAME DAY i sell at 2.42 to take 
profit.
Obviously it's not possible because the stock went down till 2.32 and 
I'm losing in fact.
Let us suppose that the day after O 2.31 H 2.44 L 2.31 C 2.42 .I 'd 
like to take my 3% when the stock cross up 2.42 the day after.
In the backtest there are a lot of days like this so results are 
wrong.
Naturally I tried many rules but Applystop always prevails over all.
Immediate IF function doesn't work.i.d.
IIf(C < O,ApplyStop(stopTypeProfit,stopModeDisable,3,1),ApplyStop
(stopTypeProfit,stopModePercent,3,1));

Has anyone had the same trouble?

Best regards,
Nick



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
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/