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

[amibroker] Re: buy and sell stoploss



PureBytes Links

Trading Reference Links

For non-programmers here is some code that is useful for educational purposes when studying volatility stops:

scroll downto find this AFL file TestMultiSignals_ABVersion at this page:

http://zboard.wordpress.com/downloads/

Substitute the following code for the %stop code in that file.

////////////////////////////STOPS////////////////////////////

//uses C as BuyPrice and the volatility band reference point
//can be adapted to use (H+L+C)/3 instead
//the cdoe fixes the vy band at the vy when the trade is entered
//this is the same method used by AmiBroker (I think)
//the easiest application is just to use the FirstPass section of the code
//warning ... for visual use in charts only ... the code contains a lookforward component and may not be suitable for Backtesting.


Vy = ATR(10);
//Plot(Vy,"Volatility",1,1);
VyPercent = 2 * Vy/C * 100;//Twice the ten bar ATR volatility, as percent
//Plot(VyPercent,"Volatility%",1,1);

PS = 1 + VyPercent/100;//ProfitStop
SL = 1 - VyPercent/100;//StopLoss
//Plot(PS,"ProfitStopVolatility%",colorBrightGreen,1);
//Plot(SL,"StopLossVolatility%",colorRed,1);

--- In amibroker@xxxxxxxxxxxxxxx, "brian_z111" <brian_z111@xxx> wrote:
>
> Hello manoj jain,
> 
> For an example of dynamic stops please refer to (scroll down to dynamic stops):
> 
> (http://www.amibroker.com/guide/h_backtest.html
> 
> Here is an article, written by Tomasz, on how to plot dynamic stops.... you will need to adapt the method for your particular example.
> If you are a programmer this should be easy for you.
> If not try it and maybe come back to the forum for some further help.
> 
> 
> http://www.amibroker.com/kb/2007/03/24/how-to-plot-a-trailing-stop-in-the-price-chart/#more-52
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "irap1981" <irap1981@> wrote:
> >
> > dear all members,
> > i want to right one indicater which plot on chart, for
> > buy stoploss (H+L+C)/3)-ATR(1)
> > sell stoploss(H+L+C)/3)+ATR(1)
> > this formula i use in metastock from last one now i want use in amibroker.
> > thank you
> > with regards
> > manoj jain
> >
>




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

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