Try this one out. It is a multi time frame and has an option to compare the Chinkou Span to price or not. When you compare the Chinkou span to price then the last Kijun Sen bars will not have values (due to a lack of Chinkou Span values for those bars)
Thanks for your work. Sorry that I didn't make myself clear enough about comparing chinkou span with price. Please make it work this way :
if last value of chinkou span >price of 26 bars ago=true, assign the value of "true" to current bar, not 26 bars ago. The reason behind this is that, when current price is higher than 26 periods ago, it suggests that current market is in an up trend. So even if on the traditional Ichimoku chart the chinkou span seems to be lagging, actually it shows current trend.
I attached here a chart for AUDUSD H4. In the upper indicator window, I turned on comparing chinkou span. In the lower indicator window I turned it off. However, as in the chart, the last chinkou span (the yellow line) value is lower than its corresponding price bar, actually in the upper indicator window, the current bar should be red, as the value is taken from the comparison 26 bars ago. Can you please modify it based on this ? Thanks
Just one clarification. If I assign the values for the Chinkou span the way you described it, do I use the real values of the Chinkou span where they exist or I should use the shifted values in the history too? Or that assignment is valid only for bars that are missing the value of Chinkou span?
For example, if current bar is bar 0, compare the value of Chinkou span of bar 26 (the bar 26 periods ago), which is actually the price of bar 0, with the price of bar 26. Based on that comparison on bar 26, you'll get a bool value of true or false. You assign that bool value to bar 0, which is the current bar. And you assign the bool value from comparison on bar 27 to bar 1...and on and on
That value assignment is valid for all bars.
Chikou Span is equal to the price (close) that is shifted Kijun Sen bars back to the past (you can easily check that - use sma period 1 shifted Kijun Sen bars back and it will be exactly the same as Chinkou Span). If we compare the current price to the Chinkou Span Kijun Sen bars ago it will always be equal and the comparison if it is smaller or greater will always return false if we use close for comparison.
Can we use some other comparison?
Let's forget about the term chinkou span. For each bar, can you just compare its close price with the close price of the bar 26 periods before it, and assign a bool value based on the comparison ? Please make that number of periods changeable, with 26 as the default, so that someone can change it to 25, 30,...if he wants to.
Here is a version that allows you to compare the price to price any number of bars back (just set the PriceBarToCompareTo to desired value) and set the ComparePrices to true if you wish the price comparison. Comparison to Chinkou Span is out of the comparison conditions in this version now
This version works great ! Thank you so much for it !
Good day, Mladen ! I would like to make a new request about the option of upgrading
the indicator from mq4 into mq5 ( it’s the "next" month already ! )
Thank you in advance and have a nice weekend, Mikhael.
Do someone know and indicator based on Markov Chains.
Is it worth digging into it ?
I just read about it and dont have a clue on its value in fx.
Please dont ask me to explain Markov Chains
Here you go Have a nice weekend