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 [email protected], "brian_z111" <brian_z...@...> 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 [email protected], "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 > > >
