Skip to main content

Modified SAR technique

This is an Amibroker formula which I use with my trading everyday. Many people use the normal SAR formula or the EMA of past five days. But the accuracy is greater with the formula that I provide here.


_SECTION_BEGIN("Modified Sar formula");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g,Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );

feb =(LLV(Low,5)*0.764)+(Ref(Low,-1)*0.236);
feb2 =(feb*0.764)+(Low*0.236);
feb1 = MA(feb2,5);
feb10 =MA(feb2,10);
Hig = EMA(High,5);
Lo  = EMA(Low,5);

Plot(feb1,"",colorBlue,512 +styleThick );



//Plot(Hig,"",colorBlue,512 +styleThick + styleDashed);
//Plot(Lo,"",colorRed,512 +styleThick + styleDashed);
Buy = Cross(High,feb1) AND MA(V,20)>500000;
Sell =Cross(feb1,Low)AND MA(V,20)>500000;
ExB =Buy;
ExS = Sell;
ExB_status = WriteIf( ExB, "Buy", " " );
ExS_status = WriteIf( ExS, "Sell", " " );
ExB_Color = IIf( ExB, colorDarkGreen , colorWhite );
ExS_Color = IIf( ExS, colorRed, colorWhite );
Filter = ExB OR ExS;
AddColumn( C, "close,", 1.2, IIf( C > Ref( C, -1 ), colorDarkGreen, colorRed ) );
AddColumn(Volume,"volume");
AddColumn(feb1,"MY-SAR");
AddTextColumn( ExB_status, "Buy", 1, colorWhite, ExB_color );
AddTextColumn( ExS_status, "Sell", 1, colorWhite, ExS_color );
GfxSetOverlayMode( mode = 0 );
GfxSelectPen( colorOrange, 2 );
GfxSelectSolidBrush( colorBlack );
GfxRoundRect(5,20, 250,63, 16, 20 );
GfxSetBkMode(1);
GfxSelectFont( "Arial",12, 700, False );
GfxSetTextColor( colorPaleGreen );
GfxSetTextAlign(0);

GfxSetTextColor( colorBlue );
GfxTextOut(WriteIf(feb1, "MY-SAR:  "+(feb1),""), 8 ,25 );

GfxSetTextColor( colorRed );



_SECTION_END();






How to calculate in excel:

Step1 : calculate the lowest value of value for past 5 days  and multiply with 0.764Step2 : Multiply the previous low price with 0.236 Step3: add the both numbers

when the close price is lesser than modified sar value , it is bearish and its time to sell your positions. when the close price is above the modified sar value , it is bullish and its time to buy. Do only when the cross-over occurs and not at other times.




Comments

Popular posts from this blog

How to use Jstock for intraday trading using Google Finance

In this post, I would like to help how to paper trade using jstock stocks scanner. This is an easy , free online software for paper trading NSE and BSE stocks. You can now look for stocks to paper trade, you can get an idea how trading works.
Follow the link to download the software  from this location (http://jstock.org/download.html) , I love to use the windows version and very impressive when it comes to paper trading. I use it to track stocks easily or paper trade daily using this amazing software.  It also comes with an android version, I am not sure of how it works!!  I will review it during some other time. But for now, lets look at the Jstock stock screener or scanner for the PC windows version.
You need have to the latest version of java installed I guess, because it runs on java platform.  After you have installed and started by double clicking. You could different tabs horizontally on the top. Close the country accordingly  depending on your need ( in my case, it is india…

JSTOCK STOCKS SCANNER

JSTOCK is a free stocks scanner, you can scan for 23 countries. Based on different criteria the search can be done.rsi buy and sell,macd buy and sell,uptrend stocks and downtrend stocks,cci buy and sell stocks.It has an Jdraw component installed and you can draw and make your own calculations.


You can do eod calculation search and realtime search ,but realtime search is little delayed due to the yahoo finance server delay.Anyways it is always worth for this application.you can export your calculations into a zip archive and you can use it again.

It includes the new cloud computing feature , you can use it in your home or office. It stores several informations for the application.you can also include your gmail id and receive email alerts or sms alerts to your mobile phone,which no one offers for free.

Check out my favorite stocks scanner code made using Jdraw which is used by many traders to make 10 percent income from stocks. Find the best formula to pick stocks in day trade and in …

Resistance and Support Afl amibroker

After months of hardwork, I was able to find this  code, You can use it to find the Resistance and Support of any timeframe in Ambroker. This can be used in weekly timeframes to pick weekly stocks for short term trading.  These levels are also called as the demand and supply zones. I will update in another post about how to pick stocks for weekly timeframes using this amibroker formula.

thanks for reading : )

thanks to original creator of this afl : )



_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
#pragma nocache
// Commentry output ....
EnableTextOutput(False);
AudioAlert = ParamToggle("Audio Alert", "On|Off");
Print_SR = Para…