The Traditional Supertrend strategy is buy whenever the trailing stoploss breaks on the higher side and reverse to shorts when it breaks on the lower side. And the Buy or Sell Decision is taken on the close of the candle.

Now how to create a strategy where when the supertrend turns to buy mode and the reference high is marked at the time of supertrend turning to buy mode. But still the actual buy will come only if the high is taken out on the upper side. Similarly when the supertrend turns to sell mode and the reference low is marked at the time of supertrend turning to sell mode. But still the actual buy will come only if the low is taken out on the lower side. When the Reference High or Low is not broken yet then the old position(Long or Short) continues.
It is just a prototype strategy to demonstrate how such logical conditions can be incorporate in your strategy to bend the system the way you required.
Why Such a Strategy?
When there is a high volatility in the market and when your supertrend signals comes at huge spike then probably some of the cases you will end up catching the signal at the peak. Most of the Big Gapup and Gap down and then a sharp reversal without taking a newer high or newer lows in such a scenario you will be end up saving a few bucks in your strategy. However it has it own disadvantages too as it delays your trading position to take at a little higher price every time as it waits for reference high or low breakout.
Steps to Install
Download Supertrend High-Low Breakout – Amibroker AFL code
2)Unzip Supertrend High-Low Breakout.zip to local folder
3)Copy Supertrend High-Low Breakout.afl file to \\program files\\amibroker\\formula\\basic folder
5)Open Amibroker and Open a New Blank Chart
6)Goto Charts->Basic Charts and apply/drag-and-drop the Supertrend High-Low Breakout code into the blank chart
7)Bingo you are done. Now you will be able to see the Supertrend High-Low Breakout system with Buy and Sell signals.
Dear Sir,
Can you please provide AFL for MACD Histogram Divergence & Hidden Divergence (As shown in your Chart)
Waiting for your reply.
Vishnu dutt kaushik
Dear Sir,
Happy Dusshera.
What are the parameters used by you in Supertrend, e.g. multiplier, period, trend mode etc.
Sorry, i went through the AFL code, but am not familiar with AFL syntax, so could not figure out by myself.
p.s. Yours is the only website in the world that talks about automation frankly and openly. Every one else is secretive and closed about this field.
Thanks,
Naren
p.s. Yours is the only website in the world that talks about automation frankly and openly. Every one else is secretive and closed about this field.
I appreciate this comment of Naren.
I feel Rajendran is educating the retail investors in beating the big sharks of financial market.. Great work Raj.
10 period & 4 multiliplier
SIR ,
PLEASE can you share the ribbon afl used in these charts and the parameters too. http://www.marketcalls.in/mcxcharts.
Regards,
jitin.
Dear Rajandran
I’ve tried the code; Not able to get the indicators (arrow marks) on the chart. Is there any parameter that needs to be set?
thanks,Tarak
Rajandran Sir,
I am use GCI MT4 live charts, i like formula – how to change (Amibroker) AFL code to (GCI MT4) .ex4 code, or how use for MT4 Chart – Supertrend High-Low Breakout
I am wait for your kind advice, Thanking you
How to write ” Maximum range over 30 days” afl code for amibroker
Sir , Happy Dipawali all of Thanks
Dear Rajandran,
which afl does the livecharts.in use?
thanks
Tarak.
It is multitimeframe supertrend dashboard just google it you will be able to land in my page
Dear Rajandran
I was trying supertrend. sometimes it shows a sell signal and then that disappears (in same candle)(i was using 3 min chart). how can we eliminate that?
your website is really good)
Thanks
Hi Rajandran,
I like this strategy very much and it’s my answer that looking for a solution to avoid trading when there’s no new HH,LH, LL or HL. However I’m newbie in Amibroker but I want to customize your AFL to suit my need. So I would really appreciated if you can guide me on these inquiries
1. What if I want to manually adjust the number of bars to look back for previous high an low? where in your AFL should I go to and edit it?
2. If I want to use “param” function for user input.
Thank you so much in advance and looking forward to hearing from you.
its not work in algostudio as a real time pl correct and inform me
This strategy works on close of the candle.
sir, how is possible high low in closing basis? there is meaningless if close in next close candle.I also request that if any member buy algostudio, your side provided some goods afl. thanks. without afl i cant do anything. thanks.
Hi,
Can Share the Afl for if stock move rise or fall 3% in a day.
Buy Side if it cross it cross previous day low then buy
Sell Side if it cross previous day high then sell