Rajandran R Founder of Marketcalls and Co-Founder Algomojo. Full-Time Derivative Trader. Expert in Designing Trading Systems (Amibroker, Ninjatrader, Metatrader, Python, Pinescript). Trading the markets since 2006. Mentoring Traders on Trading System Designing, Market Profile, Orderflow and Trade Automation.

Moving Average and Percentage Band AFL code

33 sec read

From Sudhin Bhathija,
Hi Rajandran, I want an afl which plots the following.

Say you have a 200sma, now the afl must also plot a line which is +25% and -25% of the sma, user must be able to modify this percentage or sma, could you write one thanks, I am yet to decide the sma and % hence the flexibility is needed.
Thanks,
Sudhin

The Following AFL code user has the provision for varying the Moving Average, Perentage and the type of Moving Average( SMA, EMA, DEMA, WMA, TEMA) and the color of the moving average. to change the properties right click on the chart and select properties

 
Properties of Moving Average and Perentage Band AFL code

Changing the properties of Moving Average and Percentage Band

Switching Between Moving Average

Sudhin Bhathija is requesting this simple AFL code since long time back. Anyways got it done today 🙂

Download Moving Average and Percentage Band AFL code

Rajandran R Founder of Marketcalls and Co-Founder Algomojo. Full-Time Derivative Trader. Expert in Designing Trading Systems (Amibroker, Ninjatrader, Metatrader, Python, Pinescript). Trading the markets since 2006. Mentoring Traders on Trading System Designing, Market Profile, Orderflow and Trade Automation.

[Free Course] Mini Certification on Amibroker AFL Programming

Interested in getting to know the basics of Amibroker AFL Programming then here is a free live training course to access hands-on training on...
Rajandran R
53 sec read

Smart Button Trading Module – Trade Automation – Amibroker…

This Algomojo Button trading module provides 4 modes of the button to place orders with a single click directly from Amibroker using simple smart...
Rajandran R
4 min read

AlphaTrend – Amibroker AFL Code to Manage Sideways Markets

Very simple and interesting trend following strategy which could manage sideways markets to a greater extent while following the trend. Recently I got inspired...
Rajandran R
3 min read

10 Replies to “Moving Average and Percentage Band AFL code”

  1. Thanks Rajendra, one more if you can I want one afl for [yesterday high – today low] OR [TODAY HIGH – YESTERDAY LOW], I have one for todayhigh – todaylow. See if you can put it up if time is an issue no problem, thanks once again, I appreciate your effort, may God bless you.

  2. Assume u have the following data
    day HI LO
    DAY1 100 90
    DAY2 105 83
    Now i want day1 hi-day2 low =100-83=17 or [ABSOLUTE IF VALUE IS NEGATIVE ]
    or
    day1low – day2high = 90-105= -15(MINUS 15) OR ABSOLUTE IF NEGATIVE.
    C if u can write the alf for either or I could manage with the above afl.
    Thanks

  3. Hats Off Rajandran !!!
    You may call it Simple AFL but its worth a LOT.Actually I was also looking for such a nice formula to use it for DAY trading for small gains.Thanks a LOT to you as well as Sudhin for putting up this request to a GENIUS like you.

    Amirishali

  4. Hi Rajendan
    I visited your site many times pe chance but neve took it seriously. Only today I could undersatand your good site.Thanks a lot. I want to say a few request words (i) To develop AFL like shown at this site http://www.forexpros.com/commodities/gold-technical four all time fames by increasing more indicators. You can see such combination of all indiacators in the trial software of vogaz which can be downloaded from vogaz site. (ii) To stat serial tutorial how to handle amibroker specially how to input the AFL and how to attach a sheet or remove a sheet.
    If you could provide it will be great sevice to novice people like me.
    Thanks again
    Vijay Kumar Haryana

  5. good mg Rajandran sir sir i have instal rtdf stock live data but its give message asoftware is expire give me totriol of instalation
    thanks in advavce

  6. Hi Rajandran, I want an afl which plots the following.
    we have a 8ema(green),AND 20 ema(red) now watch it cross overs ,
    1. when green goes up by crossing red we want buy signal
    2. when green goes down by crossing red we want sell signal if possible just make its afl

    sincerly
    reena

  7. hello frinds i am new in amibroker but i have programing background in c#.net can any one say me the way to create autotrading system in amibroker to send nest and now without subscribing api

Leave a Reply

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