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

[amibroker] Re: Is it possible to visulize exit made by applystop() signals?



PureBytes Links

Trading Reference Links

Thanks to Herman, Terry and Graham!  According to the method 
indicated by Graham, now I have been able to visualize the exit 
signal from regular exit rule and from applystop() function 
respectively.

Also,find the following paragraphs within the help file especially 
helpful

============================================================

Using Equity function we can build up Equity "indicator" that will 
work without the need to run backtester. Just type the following 
formula in the Formula Editor and press Apply:

buy = ... your buy rule ...
sell = .... your sell rule ...

graph0 = Equity();


Equity() function uses the buy/sell/short/cover rules that are 
defined BEFORE this function is called. The whole backtesting 
procedure is done inside Equity function that generates equity line.


Notes: 

1.   Equity line is dependant of the parameters in the Automatic 
Analysis settings 
2.   Equity traces Interest Earnings when you are OUT of the market.
If you don't want this just enter 0 into "Annual interest rate" 
field in the settings. 
3.   Equity also traces commissions. If commissions are not zero 
entry commission is taken using position size of the entry and exit 
commission is taken for each point to simulate how much money would 
you have if you closed position at given bar. 
4.  AmiBroker uses SellPrice array for long trades and CoverPrice 
array for short trades to calculate current equity value. 
5.  Equity() function is single-security and does not reflect 
portfolio-level effects like skipping trades, does not handle some 
advanced functionality offered only by portfolio-backtester. For 
more information see that table. 

=================================================================




--- In amibroker@xxxxxxxxxxxxxxx, "Terry" <MagicTH@xxx> wrote:
>
> Sorry, I swear I read the Equity does ExRem, but I reviewed the 
Help docs
> just now and Graham is correct. It even states that the exit 
values are
> retained for plotting various type exits.
> 
> Apologies and thanks Graham for the correction!
> --
> Terry
> 
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] 
On Behalf
> Of Graham
> Sent: Saturday, January 20, 2007 14:22
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: Re: [amibroker] Re: Is it possible to visulize exit made 
by
> applystop() signals?
> 
> the best way to just see them on them chart is to use Equity(1,0)
> Equity(1) is like using Equity(1,1) which will only show trades 
after a
> backtest
> 
> buy = ........
> sell = ...........
> applystop(..................
> equity(1,0);
> sell = sell>0;
> plots..................
> 
> 
> -- 
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://www.aflwriting.com
> 
> 
> 
> On 21/01/07, Terry <MagicTH@xxx> wrote:
> > Also, if you use Equity() it ExRems your Buy,Sell signals and 
you lose the
> > ApplyStop codes. If you want to see them you must plot the 
arrows before
> you
> > execute Equity();
> >
> > --
> > Terry
> > -----Original Message-----
> > From: amibroker@xxxxxxxxxxxxxxx 
[mailto:amibroker@xxxxxxxxxxxxxxx] On
> Behalf
> > Of Herman
> > Sent: Saturday, January 20, 2007 07:22
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: RE: [amibroker] Re: Is it possible to visulize exit 
made by
> > applystop() signals?
> >
> > You misunderstand Equity(), please read up on it. You hardly 
ever need to
> > use Equity(2)...
> >
> > Just try it using equity(1) and display your signals/stops. Use 
the
> > bar-Playback feature... it is great!
> >
> > herman
> >
> > -----Original Message-----
> > From: amibroker@xxxxxxxxxxxxxxx 
[mailto:amibroker@xxxxxxxxxxxxxxx]On
> > Behalf Of itmwh
> > Sent: January 20, 2007 8:13 AM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Re: Is it possible to visulize exit made by
> > applystop() signals?
> >
> >
> > Hi, herman
> >
> > My purpose is to test max loss stops, so is it necessary to use
> > equity(2) instead of equity(1) in the codes. ( As 2-max. loss ?)
> >
> >  And also in the plotshapes sentence, should I use  "PlotShapes
(IIf
> > (Sell==2,       shapeHollowDownTriangle, 
shapeNone),4,0,SellPrice,0)" ?
> >
> > Also, what do you mean that "equity(1) also removes all extra
> > signals"?  what are the "extra signals"?
> >
> > thanks for your attenttion
> >
> > best regards/ Tom
> >
> >
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Herman" <psytek@> wrote:
> > >
> > > Using Equity( 1 ) evaluates stops and writes BACK signals to
> > sell/cover
> > > arrays. Equity(1) also removes all extra signals. Depending on
> > kind of the
> > > stop various values are written back to sell/cover array to 
enable
> > you to
> > > distinguish if given signal was generated by regular rule or by
> > stop.
> > >
> > > 1 - regular exit
> > > 2 - max. loss
> > > 3 - profit target
> > > 4 - trailing
> > > 5 - ruin stop
> > > 6 - n-bar stop
> > >
> > > You would use something like
> > > PlotShapes(IIf(Sell==3,       shapeHollowDownTriangle,
> > > shapeNone),4,0,SellPrice,0);
> > > to display a particular stops.
> > >
> > > herman
> > >
> > > -----Original Message-----
> > > From: amibroker@xxxxxxxxxxxxxxx 
[mailto:amibroker@xxxxxxxxxxxxxxx]
> > On
> > > Behalf Of itmwh
> > > Sent: January 20, 2007 7:23 AM
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Subject: [amibroker] Is it possible to visulize exit made by
> > applystop()
> > > signals?
> > >
> > >
> > > Hi, I am testing a system with buy/sell signals. I use the
> > following
> > > codes to visualize the entrys and exits
> > >
> > > Buy=......;
> > > Sell=.....;
> > >
> > > PlotShapes( IIf(Buy,shapeUpArrow,IIf(Sell,shapeDownTriangle,
> > > shapeNone )) , IIf( Buy, ColorRGB(255,0, 255), ColorRGB
> > (0,255,255) ),
> > > 0,IIf(Buy,Low-5,High+5) );
> > >
> > > But now I want to add applystop() to the system to test 
multiple
> > > exiting strategies ?  Is it possible to visulize exit signals 
(also
> > > showing arrows and triangles) made by applystop() function ?
> > >
> > > Thanks for any help / Tom
> > >
> > >
> > >
> > > 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 NEW RELEASE ANNOUNCEMENTS and other news always check 
DEVLOG:
> > > http://www.amibroker.com/devlog/
> > >
> > > For other support material please check also:
> > > http://www.amibroker.com/support.html
> > >
> > > Yahoo! Groups Links
> > >
> >
> >
> >
> >
> > 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> > http://www.amibroker.com/devlog/
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> > 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> > http://www.amibroker.com/devlog/
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> > 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> > http://www.amibroker.com/devlog/
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> 
> 
> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
>  
> Yahoo! Groups Links
>



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.2/641 - Release Date: 1/20/2007 10:24 AM