Thursday, September 28, 2017

Amibroker AFL to Identify Trend Reversal

To identify a Trend Reversal in a trading strategy is a big query for every trader. Trend Reversal if caught at a good timing can be really fruitful to profit from the stock price moves.There are various methods followed by traders to identify Trend Reversal of a scrip or stock. This is a very lengthy topic which can take several pages of elaboration. Different time frames have different trends at the same time of trading periods. Every type of trader tries to follow the trend of their own trading time frame.

In Amibroker an AFL is being used which identifies Trend Reversal. The AFL seems quite interesting but one should always make it sure that before using any system it should be tested. So a good strategy to test it manually can be a Bar Replay function in Amibroker for getting acquainted. Then using the AFL in real time and paper trading through it. If the results are good then only tend to use the Amibroker afl for real trading purpose.

Read This Also: Top 10 Amibroker AFL For Trading Purpose

The AFL being posted here is on as is basis as written by the author of the AFL. You should not take it as an advice to base your trade decisions on the same. Trading decisions should be purely done on one's own initiative.

Earlier I posted a Trend Reversal AFL system based on Heiken Ashi Candles. Although the AFL had results but it was printing too many signals and was also looking into the future which meant that during backtesting it could give good results but when one uses it real time it might repaint the signals with the change of indicator readings. Therefore I thought of sharing a better Trend Reversal catching AFL where the visual effect has good efficacy. Those who tend to remain with the trend patiently would find it better to make their decisions for entry and exits as it also prints target levels. This AFL will be good for Intraday traders who choose shorter time frames like 5 minute , 10 minute , 15 minute etc. for their trading needs.
trend reversal amibroker afl
Identify Trend Reversal

DOWNLOAD TREND REVERSAL AMIBROKER AFL

41 comments:

  1. Aryan, i m a big fan of this afl, it filters out whipsaws and sideways market

    ReplyDelete
    Replies
    1. Hi ss ,

      Great to know your views.

      Happy Times.

      Delete
    2. forward looking so re-paints. will not help in live trading

      Delete
    3. Hi Girish,

      Thanks for sharing your views.

      Delete
  2. Hey Aryan,

    Thank you for the wonderful indicators.
    Is there an article on how to use this indicator?

    Thanks
    Nayan

    ReplyDelete
    Replies
    1. Hi Nayan,

      Glad you liked the indicators. This particular indicator is to help to identify the Trend which is ongoing. The Red Candles below the RED Stop line signify that the trend is currently down. The Green Candles above the BLUE Stop line shows that the Trend is Up. So you can identify the trend visually and also have an alert when the trend changes.

      Do make sure that you do not base your trades only on the signals generated through this AFL because of the fact that as with many other indicators this AFL can also give several false signals during sideways market. Do put your analysis behind the use of this indicator.

      Happy Trading !!

      Delete
    2. Hello Aryan,

      Thank you for the prompt response.
      Just a couple of more questions, on the chart I also see red and green horizontal lines, a small blue triangle, blue circle, yellow arrow and a green arrow.
      May I request you to suggest the significance of these objects please.

      Thanks
      Nayan

      Delete
    3. Hello Nayan,

      The Arrows , Circles , Dots are all pointing to signals of Buy & Sell as generated during price action. The conditions for each signal may be different and when simultaneous signals generated then all the shapes appear. The Green line is the calculated Target Line & the Red Line is the Fixed Stop Line . Also these lines are showing the range of the move.

      But please note that this AFL looks into the future and therefore it would repaint the signal.The signal may appear & then vanish. So basically do not base your trades on this AFL in Live Trading as those can go wrong.

      If you are easy with coding then you can study the whole code and you will get the required clues of various conditions.

      Happy Trading.

      Delete
  3. Hello Aryan,

    Thank you for that information.
    I'm relatively new to Ami as i'm primarily a forex trader and MT4 is my preferred platform.
    Ami does not seem to provide the kind of flexibility in placing orders that MT4 does.
    Still struggling to find a way to fire orders from Ami into Zerodha.
    Would you know of an AFL with a simple interface where I could enter the qty with buy, sell, square off buttons on AMI charts that could fire trades into my trading terminal?
    Many thanks for the help.

    Thanks
    Nayan

    ReplyDelete
    Replies
    1. Hi Nayan,

      There are some plugins which could assist in placing such orders but they are supplied mostly by the data vendors like Global Data Feeds , True Data Velocity. Some people used the Nest Plus API for firing such orders from Amibroker but currently Thomson Reuters have discontinued the NEST Plus API for some time so this facility has been stopped.

      The situation with Amibroker is somewhat pathetic at that kind of Automation which MT4 is able to provide. There has been a Plugin developed by Global Data Feeds for Zerodha Pi where Amibroker could be used for firing orders so you need to have the data feed from GFDL.

      Happy Trading.

      Delete
    2. Hello Aryan,

      Thank you for responding.
      If I may ask you a few questions (not related to the AFL's)
      I am relatively new to using Ami, have been trading forex so have been using MT4.
      IF you have used MT4, you would know its super easy to place buy / sell trades from charts on the click of buttons.
      I was trying to emulate the same in Ami, found a couple of AFL's which provided the buy / sell buttons, however apparently to fire trades into NEST, you need to have NEST Plus and the vendor apparently is not providing this anymore.
      Would you know of any tool / AFL which would let me fire trades from Ami charts into NEST without the NEST Plus API.
      Also if you may recommend good data providers for Ami.

      Appreciate your help

      Thanks
      Nayan

      Delete
    3. Hi Nayan,

      I don't think without NEST API this is possible for placing orders from Amibroker to NEST.
      There are two three brokers viz. Zerodha & Upstox who have come out with their own API for placing such orders. But for this they are charging monthly fees which is more than the NEST API fees. But it solves the purpose.

      a) https://upstox.com/developer/amibroker-afl-bridge

      b) https://zerodha.com/z-connect/tradezerodha/pi-bridge/pi-bridge-for-amibroker

      There are very few authorised data providers for NSE.

      1. Global Data feeds. ( http://www.globaldatafeeds.in/ )

      2. True Data India ( https://www.truedata.in/ )

      3. Valvenet ( http://www.vbiz.in/ ). F&O is authorized but For equity they give Google data.

      Delete
    4. Thank you for the inputs Aryan.
      Appreciate your help

      Delete
  4. GM , The Link to download the Link is not working sir

    ReplyDelete
    Replies
    1. Link Updated . Now you can download from the working Link.

      Happy Trading !!

      Delete
  5. Replies
    1. Hi,

      I checked the link. It is working fine. I was able to download the file. Try with another browser from the one which you used.

      Aryan.

      Delete
  6. Can I have a copy & paste version of the AFL. As I am not able to open the file

    ReplyDelete
    Replies
    1. I am not able to paste that much of Code in this comment box as it is out of the character limit of 4096 characters.

      Give me your E-mail ID and I will send you there.

      You can also try to download WinRar software which opens up the zipped files.

      Delete
  7. Can u pls send me the AFL to copy paste mrnsemania@gmail.com

    ReplyDelete
  8. Can u pls post this afl in Text format pls.

    ReplyDelete
  9. can u suggest any good real time data feeder for amibroker .
    Also i trade in nifty and bank nifty option but finding trend is going difficult.
    can u helop me for that

    ReplyDelete
    Replies
    1. Hi Sudesh

      If you wish to take genuine data feed services then the two companies which are prominent and providing NSE approved data are GFDL i.e Global Data Feeds Ltd and the other one is True Data India.

      Options trading involves many other variables apart from only timing trend. Therefore I would suggest you to go through various literature available on Options trading.

      One thing which is very evident and also told by trading experts is that Options are created in such a way that Options buyers are mostly on the wrong side of the trade.So be very careful if you want to trade options from the buying side. Sellers have always an upper hand in Options Trading.

      Happy Trading.

      Delete
  10. hi,
    Thanks for reply. already using Global Data Feeds Ltd for data feeder.
    but trend finding is going difficult .can u suggest any AFL for that

    ReplyDelete
    Replies
    1. Hi Sudesh,

      Trend finding through mechanical systems is possible upto a limit only. Mechanical systems are prone to whipsaws within trend therefore to get a perfect afl for trend following is difficult. If you try GMMA-Guppy Multiple Moving Average then it may be of help to get a broad look on the trend , strong and weak . You can search YouTube to see how you can use GMMA with other technical tools like Fibonacci to plan your entries and exits in the ongoing trend.

      Happy Trading.

      Aryan.

      Delete
  11. Hi, can I use this code for daily time frame ?

    ReplyDelete
    Replies
    1. This code works on Intraday Time frame in a better way & that too on 5 minutes time frame.

      Delete
  12. Sir any afl for buy signal when 1 15 mins candle closes above the 1 HR candle and vice versa

    ReplyDelete
    Replies
    1. Hi Vineet ,

      This kind of afl is not available at the moment. As soon I could get hold of it will share for sure.

      Delete
    2. Please look into the Timefreame based functions like Timeframeset(), Timeframeexpand() - those will help you code using multiple timeframes.

      Delete
  13. sir pls send this afl my mailid is shree888shree@gmail.com

    ReplyDelete
  14. sorry to trouble you. can you i cannot download the file. can you email me. growpg@yahoo.com trims

    ReplyDelete
  15. Hi Brother, very nice to share but its appreciable if you give some credits to creator as I have written this afl. Also there is way to get rid of future references of candle
    Thanks

    ReplyDelete
    Replies
    1. Hi Brother ,

      I would be more than happy to give credit to you for your work. I am sharing with the trading community for the benefit of all.

      Also can you share the way about getting rid of future references of candle , it would be a great boost for the users.

      Thanks

      Aryan.

      E-mail ID: tradecatcher02@gmail.com

      Delete
  16. Replies
    1. Hi Rohini,

      The link to the AFL file is in the post at the bottom. You may download through it.

      Delete
  17. hi sir
    can u send this afl link i cant find this sir kindly help me
    pls send this to my mail id chandru2317@gmail.com

    ReplyDelete

Required US Government Disclaimer & CTFC Rule 4.41

Futures trading contains substantial risk and is not suitable for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only consider risk capital that should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. CTFC RULE 4.41 – HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT BEEN EXECUTED, THE RESULTS MAY HAVE UNDER-OR-OVER COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS SUCH AS LIQUIDITY. SIMULATED TRADING PROGRAMS IN GENERAL ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN. All trades, patterns, charts, systems, etc., discussed in this website or advertisement are for illustrative purposes only and not construed as specific advisory recommendations. All ideas and materials presented herein are for information and educational purposes only. No system or trading methodology has ever been developed that can guarantee profits or prevent losses. The testimonials and examples used herein are exceptional results which do not apply to average people and are not intended to represent or guarantee that anyone will achieve the same or similar results. Trades placed on the reliance of Trend Methods systems are taken at your own risk for your own account. This is not an offer to buy or sell futures interests.