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.

Ichimoku Cloud Scanner v2.0 – AFL Code

1 min read


 
The Demerit with the older version of Ichimoku cloud scanner is that there is too much of difference between the cloud(stop loss) and the candle which has been overcome by introducing stop loss for the trade with little modification in the trading rules.

The above nifty chart shows a trailing stop loss(black line) of 6034. But the cloud(6137) is heavily far from the Close value(5751).

Note : Black line indicate only trailing stop loss for trades but not a trailing stop loss mechanism.

Trading Rules

1)Buy on Close above the cloud
2)Sell on Close below the cloud
3)Use the Cloud as Stop loss and reverse when the cloud is very near to the candle
3)Use STPL – (Black line) as trailing stop loss when the candle is far from the cloud
4)There is nothing to do with the color of the cloud( red/green cloud it doesnt matter )
5)Red Arrows indicates sell signal i.e candle closes below the cloud
6)Green Arrows indicates Buy Signal i.e candle closes above the cloud

Where STPL is nothing but the average of Close, Span lines SP1,SP2

Few Rules that I for the shorter timeframes 15min, 30min, hourly Charts and Daily

1)Buy or Sell Trade should be taken only on the presence of the appropriate signal. Trade should not me initiated belated to the signal

2)Dont initiate trade without sufficient signals.

3)If you are in a Buy Trade/Sell Trade book the trade if you are in profit at regular intervals. Dont wait for the next signal to exit the trade

4)For 15min trade book profit if you got 20-25pts in nifty and in Hourly Charts – 50-75 points and in Daily Charts – 150-200pts without waiting for next signal.

5)Respect the trailing stop loss when you are in trade

6)If you are confused with the way you are playing – just take rest.

Ichimoku Cloud Scanner – Amibroker AFL Code
https://gist.github.com/2fdc650dd1774f9198241f959b089161

Download Ichimoku Cloud Scanner V2.0

If you have a better Stop loss/SAR mechanism please let me know

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.

What is QuantZilla?

Quantzilla is 75+ hours of code mentoring program designed for noncoders who want to learn the coding program right from designing indicators, scanners, trading...
Rajandran R
58 sec read

Things to Consider While Building a Bracket Order Execution…

Building a Bracket Order Strategy is the most demanded request we got from most of the algomojo traders. This article explains the list of...
Rajandran R
12 min read

PlaceOrder – Multi Broker Exectuion Code Snippets for Amibroker

This tutorial explains how to build a button trading right from scratch and with a click of a button how you can send orders...
Rajandran R
7 min read

24 Replies to “Ichimoku Cloud Scanner v2.0 – AFL Code”

  1. Dear Sir,

    Thank you for the AFL.
    A few questions:
    1) If we trade on the daily chart, then should the trade be taken on the opening of the following day or on the same day. Same with hrly chart should it be on the open of the next candle.

    2) if we book profit on regular intervals, then is there a way toget back into the trade especially when the market is strongly trending as of now.

    Thank you for your time and reply
    regards
    geet

  2. my setting is default 9 and 16 for tinkensen and kijunsen .what i observed that this crossover wheather below the croud or over the cloud may be significant and in my opinion( may be i am wrong)this buy or sell signal is a powerfull than any ema cross over.
    if u can code this exploration will be helpfull .
    it will also help us study this crossover

  3. Hellow dear Rajendran,

    Better stoploss is using Chandelier SL. I do not have code for AFL, but I do have for the same in metastock ( given below).

    Stop1:=If( PREV = PREV,
    ( H – 3*ATR(10) ),
    PREV),
    ( H – 3*ATR(10) ));

    Stop2:=If( PREV = PREV,
    ( C – 2.5*ATR(10) ),
    PREV),
    ( C – 2.5*ATR(10) ));

    StopLong:=If(Stop1>Stop2,Stop1,Stop2);

    Stop1:=If( PREV > H,
    If(( L + 3*ATR(10) ) H,
    If(( C + 2.5*ATR(10) ) <= PREV,
    ( C + 2.5*ATR(10) ),
    PREV),
    ( C + 2.5*ATR(10) ));

    StopShort:=If(Stop1<Stop2,Stop1,Stop2);

    If(BarsSince(LBarsSince(H>Ref(StopShort,-1)),StopLong,StopShort);

    I would like to say something from my bottom of myheart. You are great boss, that too at very younger age, you have very good knowledge & also sharing for others.

    May God bless you & gives lots of wealth, health to you.

    Thanks
    Viswanath MK

  4. Hi Sir, Thank you for your valuable contributions to educat us.

    I am using Amibroker and copied your AFL codes to use.
    I am confused in one area is to which combination of signals need to pick up for shorter time frame trades.

    I am considering ony short time frame trades for weekly calls. If I use weekly view in charts using the afl code will the signals will be good? I tried with intraday and using seconds time frame signals are more with less difference of price.

    So i would like to take up for weekly/monthly calls . Please advice the best set of signals to use for this type of calls.

    Thank you in advance sir.
    Latha.

  5. Sorry, I am an idiot. How do I exactly implement this code? I am not a programmer and I have a very limited idea of how programming works.

Leave a Reply

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