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

[amibroker] Re: Are Trailing Stops & Stop Profit instructions giving reliable results ?



PureBytes Links

Trading Reference Links

Hi, 

Thank you very much for your explanation.

I misunderstood the meaning of  "Activate stops
immediately". After setting it OFF, the instruction ApplyStop
(stopTypeProfit) works as I wanted.

As far as ApplyStop (stopTypeTrailing) , after analyzing the code from
http://www.amibroker.com/kb/2007/03/24/how-to-plot-a-trailing-stop-in-th\
e-price-chart/
it seems to me that Amibroker calculates trailing stop levels based on
extremes of  bars, including the order entry bar( what make sometimes
additional signal, as in my example).
So my question: Is there any way, in standard Amibroker settings, to
force ApplyStop to calculate trailing stop level for the entry bar(ONLY)
based on entry price and on Close (and for all other bars - on extremes)
?

Best Regards 
Rem




--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <groups@xxx> wrote:

Wrong settings. Read the manual.

Also "activate stops immediatelly" should only be used
if you enter trades on *OPEN* price as it is said in the manual (see
ApplyStop
description).

Your pictures show clearly that you are _NOT_ entering on open !

Also check this:
http://www.amibroker.com/kb/2007/03/24/how-to-plot-a-trailing-stop-in-th\
e-price-\
chart/

Best regards,
Tomasz Janeczko

amibroker.com



----- Original Message -----
From: "rem_yah" <rem_yah@xxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, April 05, 2009 3:08 AM
Subject: [amibroker] Are Trailing Stops & Stop Profit instructions
giving
reliable results ?


Hi,

Are Trailing Stops and Stop Profit instructions in AmiBroker giving
reliable results ?

I created a simple code ( see the AFL code below), but
when I back-test it, I obtain a lot of ApplyStop (stopTypeTrailing &
stopTypeProfit) false
signals, as shown on the picture ( a false stopTypeTrailing on the left
and a false stopTypeProfit on the right)
http://img54.imageshack.us/img54/7419/e007.gif

My settings to this strategy ( I have marked ON) :
Activate stops immediately, Reverse entry signal forces exit, Allow same
bar exit.

Can somebody check it and confirm or deny my observations ?

Regards
Rem


PositionSize = MarginDeposit = 1;

ApplyStop(stopTypeTrailing, stopModePoint, TickSize *
Param("stopTypeTrailing", 30, 2, 100, 1 ), 1 );
ApplyStop(stopTypeProfit, stopModePoint, TickSize *
Param("stopTypeProfit", 10, 2, 100, 1 ), 1 );



bottomLevel = Open - 10*TickSize; // = Buy level
Buy = bottomLevel >= Low ;
BuyPrice = bottomLevel ;

topLevel = Open + 10*TickSize; // = Short level
Short = topLevel <= High ;
ShortPrice = topLevel ;
Cover= Buy ;
Sell= Short ;

CoverPrice= IIf( bottomLevel >= Low, BuyPrice, Close);
SellPrice= IIf(topLevel <= High, ShortPrice, Close);

Plot(topLevel, "topLevel", colorRed);
Plot(bottomLevel, "bottomLevel", colorGreen);





------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

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