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.

EMA Crossover High-Low Breakout Strategy – Amibroker AFL Code

1 min read

This is a simple prototype Amibroker AFL Code for those who want to design a level based breakout system when the technical event occurs(For example ema crossover, MACD crossing zero or RSI crossing above a certain threshold).

System is designed in such a way that when a bullish technical condition occurs that high of the candle price will be used for buying price reference and when bearish condition occurs that low of the candle price will be used for selling price reference.

Long Condition

Short EMA = 13 EMA
Long EMA = 34 EMA

Look for Long Opportunity on the Positive EMA Crossover.
When the EMA Crossover happens, use the high of the candle as a buying reference and enter Buy on the breakout of the EMA candle crossover high reference.

Exit Long Condition

Look for Long Exit on the Negative EMA Crossover.
When the EMA Crossover crossover happens, use the low of the candle as selling reference and exit long on the breakout of the EMA candle crossover low reference

Interested in Designing your own trading systems?
It is a comprehensive Amibroker AFL Programming course in the internet designed for non-programmers who want/willing to design their own trading logic, indicators, buy or sell trading systems, trading dashboard & trade automation.

The course starts rights from scratch explaining Amibroker features, functionalities & capabilities of amibroker and explores in-depth into Amibroker AFL programming which brings creative ideas to the traders, make them independent in converting trading ideas into amibroker afl coding logic.

Enroll Now

Amibroker AFL Code for the Simple EMA Crossover High-Low Breakout System.

https://gist.github.com/99388aa49aca1855ea02d57ece406b4e

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.

Algomojo Index Straddle/Strangle Execution Module with Intraday Stoploss

This tutorial focus on how to automate your index straddle/strangle strategy with intraday stop-loss levels with time-based entry and exits using Algomojo Platform and...
Rajandran R
7 min read

Learn How to Login into Algomojo Account using Amibroker

In the last tutorial, we learn how to automate the algomojo login process and in this video tutorial, we are going to learn with...
Rajandran R
1 min read

Amibroker Execution Module – Hedged Index Futures for Directional…

In the last tutorial, we learn the importance of Hedging Futures Position with OTM Options for Reduced Margin. This tutorial focus on how to...
Rajandran R
14 min read

2 Replies to “EMA Crossover High-Low Breakout Strategy – Amibroker AFL Code”

  1. Sirji

    Can you please help me to make available the following condition AFL as well as stock scanner.

    BUY = EMA 5 crossing above EMA 20 with RSI above 60 and awesome > 0 and volume > previous candle
    SELL = EMA 5 crossing below EMA 20 with RSI below 40 and awesome previous candle

    I Hope you will help me.

    Thanks a lot.

    Awaiting for your response

  2. Sir,
    I was searching over internet to find *linear regression forecast/curve* afl but didn;t find anywhere.Some versions are not satifactory or true which can be said to be LRF.Also its difficult to code not simple,can u provide the same and give insight on whether we need to define custom indicator code again in afl or we can call it in from file and use like mt4(icustom).How to work with different custom indicator based system in your next blog post.

Leave a Reply

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