Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in and Co-Creator of Algomojo (Algorithmic Trading Platform for DIY Traders)

Modified 5 EMA High-Low AFL code

1 min read

I had recieved many complaints from few of the Amibroker users that the 5 EMA High-Low AFL code is not working. So had done some correction and few modifications in the code.
[wp_ad_camp_5]

 
Nothing much modification but the old code contains continuous & Excessive Buy or Sell signal on the charts that has been removed in the newer version just buy adding the EXREM funtion and the buy are sell condition remains the same i.e buy above on close above 5 EMA high and sell below 5 EMA low. And an Interactive Dashboard which tracks the 5EMA High-Low values in the dashboard.

Preferred timeframe
Mostly suitable to work at higher timeframes like Daily, Monthly, Weekly

Buy = Cross(C,EMA( High , 5 ));
Sell = Cross(EMA( Low , 5 ),Close);

Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy );

Nifty 5 EMA High-Low Weekly Charts
Modified 5EMA High - Low Dashbord

Nifty Weekly charts are shown with 5EMA High-Low buy or sell signals. Currently Nifty is in buy mode on long term(Weekly time frame) with 5 EMA low supports near 5495 zone. Any close below that could warn a downtrend on longterm.

5EMA High-Low AFL with Dashboard Style
https://gist.github.com/e32ca33b2f01a8ab00f6

5EMA High Low AFL

Powergrid and IDEA – Two stocks to watch for Very Long Term

Powergrid and IDEA monthly 5EMA high-low charts has been shown. Both the charts produces a buy signal last month. Powergrid longterm trend had changed to buy mode almost 12 months later and 5 months for IDEA. Currently both IDEA and Powergrid are trading above 5EMA high zone and 5EMA montly low zone could be the trailing long term supports Rs 67 and Rs 100 respectively. Long term investors can concentrate on these stocks for better investment.

Powergrid Monthly chart

IDEA Monthly chart

Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in and Co-Creator of Algomojo (Algorithmic Trading Platform for DIY Traders)

How to Perform Machine Learning Using Amibroker and Python

Amibroker is a powerful technical analysis and trading system development platform, used extensively by traders and analysts for developing and deploying trading strategies. Python,...
Rajandran R
5 min read

Preparing the Features Dataset using Amibroker Exploration – Machine…

There are various methods to prepare the feature dataset, which is a crucial input for a machine learning prediction model. One approach is to...
Rajandran R
1 min read

Dynamic Color Coding in Amibroker Profit Tables: A Visually…

Profit tables are a valuable tool for traders and investors to analyze the trading strategy performance of their investments over time. However, the traditional...
Rajandran R
3 min read

14 Replies to “Modified 5 EMA High-Low AFL code”

  1. do you provide us candle graph chart with different EMA (3,13,34) for intraday tradeing.if is it possible then send detail site address, so we can study in detail. We are searching for same to evaluate the trend of further movement of a market of a particular of a company. Waiting your reply, till time thanking you.

    your’s

    MANAN JHAVERI – MUMBAI – INDIA

    1. @Manan Jhaveri

      You can check out NSETracker for intraday realtime charts for nifty with parameters 13,34,55 EMA we had stopped using
      3min EMA as 3min EMA can be roughly taken as the candle itself

  2. sir ur broco live update which site sir pay chart i want sir. then sir indicator i see zigzag indicator so i want buy sell indicator u creat and give me sir when ever zigzag come next candle buy sell indicator creat me sir how much cost u tell sir . sir see 30minites 60 minites timeframe see sir

  3. thank and see mail give me mail sir what i telling u no sir 30 minites 60 minities u see zigzag come then buy sell signal u creat sir u r thise filed u r graet sir see then u give my mail sir.

  4. Hi,
    I am trying to plot 2 EMAs using AFL, one is from 5 min and other is from 60 min.
    I don’t think Amibroker is plotting MA from 60 Timeframe properly, it shows up as a step where as I was expecting it to be a smoothish one, Here is the code and the result is shown in the image.
    Am I missing something here? Can you please help?
    Look forward to your response and help.
    thanks a ton in advance.

    CODE
    TimeFrameSet( in5Minute ); // switch to 5 minute frame

    /* MA now operates on 5 minute data, ma5_13 holds time-compressed 13 bar MA of 5min bars */

    ma5_13 = MA( C, 13 );

    TimeFrameRestore(); // restore time frame to original

    TimeFrameSet( inHourly ); // switch now to hourly

    mah_9 = EMA( C, 9 ); // 9 bar moving average from hourly data

    TimeFrameRestore(); // restore time frame to original

    // plot expanded average

    Plot( TimeFrameExpand( ma5_13, in5Minute), “13 bar moving average from 5 min bars”, colorRed );

    Plot( TimeFrameExpand( mah_9, inHourly), “9 bar moving average from hourly bars”, colorBlue );

  5. Please see the AFL code below and attached image, i was expecting the MA from 60 min TF to be smoothened just like other EMA is there anything wrong in the code? Please help.

    TimeFrameSet( in5Minute ); // switch to 5 minute frame

    /* MA now operates on 5 minute data, ma5_13 holds time-compressed 13 bar MA of 5min bars */

    ma5_13 = MA( C, 13 );

    TimeFrameRestore(); // restore time frame to original

    TimeFrameSet( inHourly ); // switch now to hourly

    mah_9 = EMA( C, 9 ); // 9 bar moving average from hourly data

    TimeFrameRestore(); // restore time frame to original

    // plot expanded average

    Plot( TimeFrameExpand( ma5_13, in5Minute), “13 bar moving average from 5 min bars”, colorRed );

    Plot( TimeFrameExpand( mah_9, inHourly), “9 bar moving average from hourly bars”, colorBlue );

  6. Sir, thanks for ur 5ema high alert afl. please help me to get pop up window . so that we will get pop up alert with stock name in different time frame

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More