Sunday, July 30, 2017

3 Day Highest High Breakout & Lowest Low Breakdown System

Traders want to catch the momentum, which turns the trade profitable quite quickly which is a satisfaction in itself for the traders. When the trend heats up many traders want to follow the breakouts or breakdowns of important levels in the price history. Two such levels which are looked keenly by traders are the Highest High and Lowest Low made in the previous 3 days of the current day.

The following Amibroker AFL which is posted below for download, plots the 3 day highest high and lowest low levels on Amibroker chart.

3 Day Highest High Breakout & Lowest Low Breakdown System
3 Day Highest High Breakout & Lowest Low Breakdown System


DOWNLOAD 3 Day Highest High Breakout & Lowest Low Breakdown Amibroker AFL

16 comments:

  1. Dear Aryan,

    Thanks a lot for this AFL.
    You are a champion.

    Thanks
    Nayan

    ReplyDelete
    Replies
    1. Dear Nayan,

      You are Welcome. Happy Trading !!

      Aryan.

      Delete
  2. Wish you the same Aryan

    Thanks
    Nayan

    ReplyDelete
  3. Hi Aryan,

    Thanks a lot for all your effort in sharing so much knowledge with us. I have one query - do you have any afl/exploration which will keep on running the whole day and give the sound alert whenever the intraday volume of any stock > last 7 days / 1 month volume ?

    Please let me know if you this stuff in your treasure.

    Thanks again.

    Cheers :)

    Jaspreet

    ReplyDelete
    Replies
    1. Hi Jaspreet,

      Thanks for your compliments. I will try to find the solution for the query you have raised. If it happens to be possible I would post such AFL at my Blog.

      Happy Trading.

      Aryan.

      Delete
  4. Thanks Aryan. Happy Trading to you too :)

    Jaspreet

    ReplyDelete
  5. Dear Aryan,

    If I may bother you one more time please, may I request you to to let me know the modifications to the code if I have to scan the days when the current day open is above / below the previous 3 day high / low.

    Many thanks

    Regards
    NK

    ReplyDelete
    Replies
    1. Hi Nayan,

      You mean you want to scan for the current day in Real Time on several stocks for this condition or you want to backtest on this condition for historical data?

      Happy Trading !!

      Aryan

      Delete
  6. Hello Aryan,

    Both maybe, if its not too much to ask for.
    Appreciate your help Aryan.

    Thanks
    NK

    ReplyDelete
    Replies
    1. Hello Nayan,

      Will look into it soon what can be done.

      Happy Trading !!

      Delete
    2. Hello Aryan,

      I was trying to modify your code to backtest the scenario mentioned above (open GT high of last 3 days).

      Session= TimeNum() >= 091500 AND TimeNum() <= 091600;

      Buy = iif((doo > maxh)&&Session,1,0); "Modified the buy and sell condition
      Sell = iif((doo < minl)&&Session,1,0);

      Filter=((Buy = 1) OR (Sell = 1)) ;

      But when I click on New Analysis window, it shows me all the dates in the scanner for the symbol.
      May I request your help to know what I am doing incorrect here.
      Sorry I am not a coder, I try to google some sample codes which may help.

      My apologies if I may be bothering you with this request.

      Thanks
      Nayan

      Delete
    3. HI Nayan,

      I was suffering from viral flu for last many days so couldn't look at things at all. Now I would try to have a look at your requirement in a couple of days as the body recoups the lost energy . :-)

      In the above query when you are scanning, if you want the scan for a particular day then choose the scanning condition i.e RANGE --> From To Dates . Maybe in your case the Range --> All Quotes is chosen. In From to Dates choose as the current date in both the boxes.

      If this solves your purpose do tell me.

      Have a Nice Time.

      Delete



    4. Hello Aryan,

      Thank you for the prompt response. Do take good care of your health.
      Whenever you recover fully and have some spare time, may I please request you to guide me on the following requirement:

      I am currently focusing on the banknifty. Have data on it for the last 10 years.
      So wanted to scan all the days during the last 10 years when the daily open was above the previous 3 day high or below the previous 3 day low.

      Session= TimeNum() >= 091459 AND TimeNum() <= 091559;

      Buy = iif((doo > maxh)&&Session,1,0);
      Sell = iif((doo < minl)&&Session,1,0);

      Filter=((Buy = 1) OR (Sell = 1)) ;

      This code inserts the buy and sell arrows on the charts, but in the analysis window when i click on Scan, it just gives me crazy results.

      I have applied it to the current symbol and put a from and to date range there, still does not work well.

      Thanks a million Aryan for considering my request.

      Thanks
      Nayan

      Delete
    5. Hello Nayan,

      What Time Frame you chose in the Settings window of New Analysis which is meant for backtest ? If it is showing correct arrows that means the code is near to be correct for backtest as well.

      Happy Times ..

      Aryan.

      Delete
    6. Hello Aryan,

      Thanks a lot for this input.
      I corrected the time frame in the settings and it works like a charm.

      Much appreciated.

      Wish you a speedy recovery.

      Thanks
      NK

      Delete
    7. Hello Nayan,

      Really good to know about your success in achieving what you were aiming for in the code.

      Thanks for your wishes.

      Happy Trading & Take Care

      Aryan.

      Delete

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.