Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Ichimoku Additions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Ichimoku Additions

    What follows in this thread are a collection of indicators I have developed based on the Ichimoku Indicators available in the Shared Indicators section of this forum. More on the Ichis can be found at: http://www.kumotrader.com/ichimoku_wiki/; also at http://www.kumotrader.com/forum/index.php

    Introduction to these Indicators:

    I am into day trading and mainly use tick charts. I also like to compare 2-3 'timeframes' and usually set them up thusly:

    ST = 45 tick
    Main = 90 tick
    LT = 270 tick.

    These change based on the market being followed but the main idea is that the LT is 3* the Main Chart and the ST is half and I use it to help with entries and exits in certain types of conditions, basically cutting the Main bars in half.

    It is for this type of setup that I began to work with re-coding the Ichis. Principally, I started off with adding a 3rd Ichi to the default 2 (hence the name 'Ichi3'). This third Ichi corresponded to the LT Median (Kijun) in the 270 LT chart. To be clearer:

    90 Tick 'Main' Chart
    Tenkan (FastPeriod) = 9
    Kijun (MediumPeriod) = 27
    Kijun2 (SlowPeriod) = 81

    270 Tick 'LT' Chart

    Tenkan (FastPeriod) = 9 ( = 27 on the Main 90 Tick chart)
    Kijun (MediumPeriod) = 27 ( = 81 on the Main 90 Tick chart)
    Kijun2 (SlowPeriod) = 81

    In this way, on the 90 chart the Kijun and Kijun 2 have the same values as the Tenkan and Kijun on the 270 chart.

    Now there is a further wrinkle: the default Cloud values for an Ichi Chart use a slower Slow Period which is double the Kijun, i.e. 54 on the 90 Tick Main Chart. This I have not changed.

    So on the Main Chart we have the Tenkan (9), Kijun (27), Kijun2 (81) and the Clouds are basis Kijun*2 = 54.

    One thing I have noticed tracking this setup is that the K2 often tracks the Senkou Span B (slow Cloud line) exactly, often for many bars at a time, but then it moves away and the direction in which it moves provides yet another trend indicator - longer term. It is slow, but it is rarely whipsawed like the shorter term ones can be.

    I have also added in another new line which I call the 'Equi', for 'Equilibrium'. This is the average of the 3 Lines and it is helpful because sometimes the three lines are regularly spaced, but sometimes they are 'conflicted' or 'unbalanced'. For example, in a strong trend they tend pretty quickly to become 'lined up' as in (bull example): K2 is at the bottom, then the K, and then the T on top, sort of equidistant from each other.

    But sometimes you get a Tenkan over Kijun (T-K) bull cross, but the K2 is way above them (conflicted market). And sometimes you get a Tenkan way up there after a recent rapid move the past few minutes but the K and K2 are quite a ways below indicating the market has got ahead of itself. The Equi shows the relative mid-point of all three. Very simple but helpful.

    I have also used this Equi as the basis for an RSI indicator showing OS and OB within the context of the trend as defined by the Ichis, not the price alone.

    In addition, I have added to the standard Donchian Indicator which shows the Donchian Channel Highs and Lows with the median (a median is the same as an Ichi line) by mixing in an ATR-derived calculation that determines when the range is narrow enough to be called a Trading Range and it Back Colors accordingly. It is not always correct, like anything, but it is often quite quick to identify a Trading Range, after which a break out, especially one in the direction of the LT Ichi Trend, can often yield dependably favorable action.

    In addition, you can put on the LT clouds by inputting the correct values so on the Main Chart alone you can see the basic two Ichis, plus the LT Kijun, the basic Clouds, plus the LT clouds.

    I would like to share these indicators even though I am not a proficient Ninja coder because I got these from the Ninja forum and would like to give something back, little as it is.

    I will soon post one at a time with a picture and a brief explanation, although if you find them of interest and read through the code and look at the charts they should be fairly self-explanatory like most simple indicators.

    The Ichis are unusual in that, based on simple Median prices alone, and with a simple yet sophisticated way of comparing present action to the past (the Chikou line) and also with the future (displaced Senkou 'Cloud' formations, you get an ongoing picture of support, resistance and trend.

    So first, the basic Ichi3Line Indicator along with what I call 'Cloud2' because I have added the Senkou Cross as both an audible and visual alert plotted at the price it occurs on the current bar even though it is projected out the Kijun Period distance (27 bars) into the future. In live trading you often won't have the chart adjusted to see this happening, so the alert is helpful. That is the only change I made to the one on the forum.

    In addition to the general features mentioned above, the Ichi3 Indicator also has various bells and whistles, many of them no doubt coded in a somewhat beginner-like fashion, but they work and I have been using them for a few months now without any problem.

    Features include:

    Drawing a diamond on the close and also a line back to the Chikou Span Cross point when it occurs. This happens when the Chikou line (which represents the price 27 bars ago and is plotted on the screen 27 bars back) crosses through the current price. Sometimes it's hard to see when it's doing that (not so much in live training but in historical review), so this helps. I think there is also a sound.

    I have arrows showing when there is a cross of the Tenkan over/under the Kijun.

    There are back colors for various types of trend - simple cross over of T and K, or when all 3 lines are 'lined up'.

    There are 'Pullback' Triangles which indicate when a short term counter trend move has happened for several bars in a row indicating a return to the trend might soon occur. There are some small filters involved with this which are easy to understand in the code hopefully but I can explain more if anyone is interested or has questions. (Same for all of the above of course).

    There are also 'Rubber Band' triangles which show when the market has gone zooming up or down far enough away from the Kijun basis the current ATR (volatility) to trigger them. They often give an indication when things are due for a pause.

    There is also a K2-SenkouB cross which is when the LT Kijun crosses over the SenkouB (LT Cloud) line.

    Some of my bells and whistles you won't like or find helpful. I believe they are all turnable-offable. But some simply take the basic Ichi methods and make them more clearly displayed, in particular the Cloud (Senkou) Span cross, the Chikou Span cross.

    Further indiators to come that complement this:

    Donchians with the Trading Range component;
    Equi-based RSI indicator
    RPM - Range per Minute indicator helpful for Tick-Chart traders.

    In all cases where there are sound files, you are probably going to have to manually type in your own preferred sounds. I have made several indicating trends and if people request it I can also post them here, things like '45 bull' and '45 bear' etc.

    Any comments, feedback, suggestions for improvement, more elegant coding solutions etc. are most welcome.
    Attached Files
    Last edited by cclsys; 07-30-2009, 02:21 PM.

    #2
    In the picture attached above just to clarify a little:

    OS rubbers in bottom left (maroon triangles)
    Dots in a line show the current Donchian High/Low levels
    Tenkan- Red Line
    Kijun - Green Line
    KijunLT - Dark Green
    Equi Main- Pink Hash
    Equi LT - dashed (barely visible) purple line
    Pull Back Triangles - in this example the ones plotted are from the LT Ichis (as determined by the relative position of K and K2 versus Tenkan and Kijun), so although the ST trend as defined by T and K is up (in the middle left area for example), the LT was down, so the lighter blue triangles were plotted. 90 tick based triangles in my setup are a darker blue or gold, but there aren't any in this particular example.)

    Light Blue or Gold arrows indicate LT TK cross (shown on this Main Chart as the Kijun and Kijun 2, light green and Dark Green respectively.

    Darker Blue or Gold indicate 90 (this chart's) TK crosses. One happens around 13.55 just before a pink trading range starts.

    K2 Cross Arrow: the dark pink down arrrow also around 13.55 indicates the K2 median (equivalent of the LT Kijun on a 270 chart) crossing under the SenkouSpanB cloud line. In this example, the K2 line ended more or less tracking the SSB line sideways. After this chart ended (whilst I was posting, both the K2 and the SSB cloud line moved down a little and the mkt with it, although basically nothing is going on with this market right now except consolidation after a huge move two hours ago.)

    LT Clouds (with purple lines to define them as such) in lower right
    Main Clouds going up and down across the chart. These clouds are drawn 27 bars 'before' the market and anticipate probably support-resistance zones. In this case, with such oscillating but sideways action they 'anticipated' a sideways trading range type market which is what happened. When the market charges through these, it indicates conviction one way or another (the 270 cloud is way below current mkt because there was just a big move at 1.00 pm EST which the mkt is still digesting.)

    Green BackColour = not-lined up market
    Blue Back Color = bear market
    Gold Back Color = bull market
    Pink Back Color = Trading Range.
    Pink Square Lines = Chikou (current close displayed relative to 27 bars ago and plotted on those previous bars to compare current with past price quickly. Part of classic Ichimoku methodology not explained here.)

    The beige and greyish-bluish zones are the clouds, beigish being bullish and grey-blue bearish.

    GoldenRod Dot indicates a Senkou Span Cross (happening off the chart 'in the future' to the right) at the price at which the cross occurred. This is also part of classic Ichi methodology not explained here.

    The RSI indicator back colors (not yet attached) are based mainly on the Ichi Trend, not on the indicator values itself. This one tends to turn less quickly than most RSI-type oscillators, but is helpful at identifying pullbacks against the trend. It is based on the movement of the close relative to the Equi price which is the average of the close - each of the three medians, so although it responds to bar-to-bar action, it is not based on simply that alone, rather closing price in relation to overall median prices. When the code is posted reading it will be simpler than trying to explain which is more difficult for some reason.

    The Better Volume Indicator developed by Barry Taylor is taken from the Indicator Sharing area.

    The RPM indicator (also not yet attached) has nothing to do with Ichimoku, but is helpful for those trading tick charts. It shows the relative price action in terms of the number of ticks per minute rate, something which is sometimes hard to gauge looking at the tick chart alone.

    I have also changed the SlingShot indicator so as to be able to fill in the gap between the Tenkan and Kijun in bullish (gold) or bearish (steel blue) fill colors with about 15 opacity. It just adds more texture to the color-background, most of which I don't even see consciously, rather it just gives an overall sense of the weather, i.e. is it bullish or bearish or some sort of mix right now.

    At first the chart might seem too busy, and probably it is. But after a while most of the clouds, back colors and lines fade into the background, though they provide general as well as specific support/resistance and trend information around current price action, which is all they are designed to do.

    General Color remarks: Everyone has their own set up which looks strange to others. To help 'read' mine basically I have the bull and bear colors based on what could be called a daoist approach, namely with dark/heavier colors indicating sinking, i.e. going down, as with water which is blue, versus lighter colors going up. So I have blue as bear, Gold/yellow as bull, and green, which is a mix of both, as neutral. So then I tend to use purples and reds as indicator colors.

    I have never really liked the notion of red being bearish (I think it comes fro a Stop Light reference) and Green being bullish (Go light). Maybe that makes sense for long-only stock traders, but not for futures or especially futures day-traders. In any case, that's the way I do it.
    Last edited by cclsys; 07-30-2009, 01:31 PM.

    Comment


      #3
      Consolidated Code

      After posting the above, I realised it was time to clean up and consolidate the code a little.

      So here attached is a file with both 'Clouds3' and 'IchiLines3' that have the following improvements/simplifications:

      1. Clouds now has the Displacement Nr in the code and also you only have to input the FastPeriod and the rest is automatically calculated.
      2. Ichi3 now has the Donchians, along with the Trading Range pink back color, incorporated.

      So to set up a basic chart, you just set the Fast Period (default is the original Ichimoku Developer's 9), load both Ichi 3 and Cloud 3, and you have it.

      I also add in a second Cloud 3 based on 3* the base amount (i.e. 27) and a second Ichi3 with only the LT Kijun displayed, in my case and for both using purplish colors to distinguish them from the Main Ichis and that way you can quickly have a chart showing 2 timeframes.

      I also attach the RPM (Range per Minute for tick chart traders) and IchiRSI indicators. The RSI is designed to help show favourable pullback/retracements areas in an overall trend. The default length is 9, same as the other Ichis.

      The RPM has the option to include a sound alert. I have coded it to Alert1.wav and others might want to change this inside the code since there is no option in the Menu Panel to reference the file, although this can easily be done.
      Attached Files
      Last edited by cclsys; 07-31-2009, 01:34 PM.

      Comment


        #4
        Thanks for sharing cclsys. We appreciate your efforts made here.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thxs for rmks Josh.

          Just want to share a little having benefited from much that has previously been offered. My coding skills are still rudimentary, but hopefully some people might find this adaptation of Ichimoku, which was designed in the 1960's (?) as a trend trading approach, helpful.

          Although entirely based on Donchians essentially (like the renowned Turtle Trading methodology I believe), and therefore being structurally simple, the developer managed to derive a rather sophisticated way of comparing present price to both past and expected future action all of which can be relatively simply displayed. Apart from my pullback and RubberBand OB/OS triangles, I have done nothing more than
          a) include alerts/visual markers for some of the Ichi method signals
          b) make it easier to integrate 2 or more timeframes together by adding a 3rd line that corresponds to the 2nd line in the longer time frame.

          The method does not lend itself to Strategy coding since it has five core inter-related elements that give greater or lesser weight to individual trigger-signals, but as an indicator method for daytraders it is actually quite sophisticated once you get used to the multi-layered display which tends to disappear into the background as you focus on the price action, or rather it provides layered context in which current price action can be easily interpreted.

          Meanwhile, I used it as an opportunity to become (very slowly!) more competent in Ninja coding.

          Comment


            #6
            I have cleaned up the Ichi3Lines code eliminating many of the redundant Menu Panel options and some repetitions in the coding. The indicator started off as a way for me to learn how to code better (still a VERY long way to go) but ended up being something I like using. But a large number of menu options were not being used and it was time to clean up.

            So I attach a 'clean version' (with picture).

            Some of the improvements:
            1. Donchian plots included and don't plot on bars making new highs/lows
            2. PB arrow condition is now a function of ATR/volatility so no need to manually input a tick number when changing timeframes
            3. Back Color options now in a choice of numbers versus several related (and sometimes conflicting) booleans.
            4. Added in back color options that respond to the slope of the Tenkan and Kijun
            5. Added in Bollinger SMA that acts as a parallel but unrelated system/reference and also included as a back color option. On chart are displayed as (barely visible) silver dash lines. SMA same length as Kijun.
            6. Have changed one of the alerts to PlaySound and if it works properly will change them all since the code is clearer that way (alerts have so many additional options not needed when playing a sound).
            7. A new 'Leadline' which attempts to project the future price and also anticipate the turns a little better than the Tenkan; frankly, this has not worked. If anyone knows of a good lead line formulation it could be included but as of now my first attempt - which adds/subtracts the relative change in value of the Tenkan to a 3WMA of the median price (and many combinations around that idea tried to no avail) is really not all that helpful and I have found that paying attention to the slope of the Tenkan is as good a lead as anything else I have attempted - hence the new Back Color options that respond to the slope of the Tenkan and one that responds to both Tenkan and Kijun and one that responds only to Kijun. They are good additions for catching shorter term swings, especially in the context of the overall trend as defined by the Ichis.

            Also include a pre-figured LT version for use when overlaying on the same chart as in the picture. In this case the colors are slightly different and also the default Period is 3* higher; also the back color function is disabled (0).

            PS 131 EST: had a couple of additional ideas with the new back color options and have replaced the zip file. They are just a slightly better way of gauging trend of the Tenkan and Kijun using a Trendup/Trendown approach versus only the slope.
            Attached Files
            Last edited by cclsys; 08-15-2009, 11:33 AM.

            Comment


              #7
              Of note in the picture above is how Senkou (cloud) crosses are often helpful.

              In the attached smaller pic below you can see the golden circle bottom left which shows the price at which a Senkou Span cross up has been plotted (27 bars into the future). As it happened, this price level ended up being close to final support, but also notice how at the time when the cross was 'predicted' by the Senkou plots drawn 27 bars ahead of the current price action, the market lifted off above the upper clouds and then commenced a mighty move into the close (TF on Friday Aug 14). Indeed, the breakout above previous resistance happened 1 bar after the Cross around 15.35.

              It doesn't always happen this way, but it is surprising how often it does.

              Note also how a pink K2 cross up arrow (which is the slowest indicator in the code except for the darker colored K2 cross up from the larger timeframe) occurred soon after this up move began despite this following a sustained, significant down move. Although it is not always correct - like anything - most of the time these K2 crosses confirm that a new move is under way and most of the time there is further action in the direction of the signaled move even though they are based on 81 or 163 bar medians.

              Also note how combining the time frames can be helpful since this breakout also penetrated the LT clouds. The first breakout around 15.00 began the move, then the mkt hesitated and pulled back at the 270 clouds, but did not come down even as far as the 90 clouds, then it made a second upside thrust at 15.36 which penetrated the 270 clouds, happened to be right at the time 'predicted' by the Senkou Cross, after penetrating the 270 cloud to the upside (which is one of the five major Ichi Buy Signals), it pulled back to the flat top of that cloud, and then it was off to the races to the upside.

              A further indication of possible continuation, even though it was 4.00 when often there is a snap-back rally if the mkt has charged somewhere into the cash closing time, was
              a) the 90 clouds crossing over the 270
              b) the K2 Cross-up arrow which indicates long term upside breakout as current prices exceed the expectations of the LT cloud (which again were drawn 27 - or in this case 81 - bars ago. Sure enough, it zoomed up the last 15 minutes.

              Ichimoku is fundamentally simple, but a very well thought out methodology developed long before the computer age. But it is based on simple market logic and can be helpful in terms of reading the trending or non-trending nature of the market by comparing current price action, using Donchian Medians, to past price via the Chikou and future price/expectations via the Senkou/Clouds.
              Attached Files
              Last edited by cclsys; 08-15-2009, 11:37 AM.

              Comment


                #8
                Updates to the RSI indicator:

                1. The 35-50-65 lines are now essentially replaced with 3 new lines at the 30-50-70 levels showing the trend of the 3 Ichis (Tenkan-9, Kijun-27, KijunLT-81). This trend is defined by the line itself not in relation to the other lines in this case simply if it is going up or down, there is no neutral.

                2. The RSI line is color-coded according to the Tenkan-Kijun crossover trend with the addition of turning neutral (green) when the Tenkan and Kijun are in conflict trend-wise; conflict in this case means when the Kijun Trend from above is, for example, trending up but the Tenkan has crossed beneath it, this is neutral and plotted green.

                3. The Back Color is the same with various (progressively darkening) opacities depending on T and K trend and relationship.

                4. The basic RSI line is the same, based off the 'Equi' or 'Equilibrium' Line (average of all 3 Ichis relative to the Close).

                So this is a fairly clean indicator (though not smoothed) that gives quite a bit of information as to the degree to which the ST, MT and LT trends are lined up or in conflict, relative OB-OS conditions, and also consolidation.

                Personally I am quite pleased with it and having compared it with many other oscillators am now comfortable having this as the only one on my main Ichimoku template.
                Attached Files

                Comment


                  #9
                  Hi cclsys,

                  Many thanks for your work and many thanks for sharing.
                  Could you please post your Ichimoku template.

                  Regards

                  Comment


                    #10
                    Originally posted by Master View Post
                    Hi cclsys,

                    Many thanks for your work and many thanks for sharing.
                    Could you please post your Ichimoku template.

                    Regards
                    OK, here's a template. I also attach the all the coding including Clouds for black screens.

                    Plus another simpler template for a black screen I made today that doesn't have all the lines, but also has the 'Squeeze Indicator' which developed on further from the RSI one in the picture you saw. There are a few minor problems with the Squeeze with time bar charts for some reason, but basically it is good although the (very bright) colors were made to be on white background charts and look garish on the black.

                    Hey, this is a Japanese system and they are very elegant visually!

                    Ninja doesn't allow us to upload xml files apparently, so I can't include any workspaces. But just load up the indicators to the default settings and then play around with turning on and off various options in the Menu Panel.

                    Enjoy!
                    Attached Files

                    Comment


                      #11
                      That's really good job.

                      Workspaces and templates can be exported/imported manually using the path C:\Documents and Settings\YourName\Mes documents\NinjaTrader 6.5 and folders "templates" or "workspaces".

                      Thanks for your very quick reply.
                      Have a nice week-end.

                      Comment


                        #12
                        Am starting to enjoy your enhanced indicator for the Ichimoku. How do I STOP the Alert sound from ringing once its has started. It can go on for hours. There is no way to STOP it. Can you please help and explain.

                        Comment


                          #13
                          Originally posted by perryg View Post
                          Am starting to enjoy your enhanced indicator for the Ichimoku. How do I STOP the Alert sound from ringing once its has started. It can go on for hours. There is no way to STOP it. Can you please help and explain.
                          It would help if you said which indicator is making the alert. Do you know? As far as I know, they all have an input for turning the alerts on or off. Also, you can go into the code and just comment out (//) the lines with the alert.

                          Guess: I suspect the problem is that you are using CalconBarClose = False: if so, change to CalconBarClose = True. If problem persists, then we'll have to get more detailed to fix the problem.

                          These indicators should not be on live update each bar if you are using any of the pullback signals or alerts etc. since they will print/chime etc. every new tick during a bar that the condition is true (whether or not that condition ends up being true at the end/final close of the bar).

                          Comment


                            #14
                            Yes, you are corerct, I am using CalconBarClose = False. I will change that. Which chart is giving the signal, is also difficult to know, as I have a number of charts up, and this is another question, HOW do I know which charts is eventually giving me the indication.

                            Comment


                              #15
                              Would it be possible to post a BIG chart with an explanations of all your indicators. I have read your post over and over and it is not clear how and which INDICATORS are for what. e.g. I get a Stell blue DOT and a GOLDEN DOT. Not clear why. I know it is a future crossover but for ST or LT. The indicators are not clear. I cannot see use for the Bolliger Bands, am I missing something. The color of the triangles and the arrows are not clear. I love the 2 cloud idea for LT and ST on the same chart.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Irukandji, Today, 09:34 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post Irukandji  
                              Started by TraderBCL, Today, 04:38 AM
                              3 responses
                              24 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by WeyldFalcon, 08-07-2020, 06:13 AM
                              11 responses
                              1,423 views
                              0 likes
                              Last Post jculp
                              by jculp
                               
                              Started by RubenCazorla, Today, 09:07 AM
                              0 responses
                              4 views
                              0 likes
                              Last Post RubenCazorla  
                              Started by BarzTrading, Today, 07:25 AM
                              2 responses
                              29 views
                              1 like
                              Last Post BarzTrading  
                              Working...
                              X