Instead of using the open-high-low-close (OHLC) bars like standard charts, it uses a modified formula. Out of which only following two are used in this strategy.
High = Max (High,Open,Close)
Low = Min (Low,Open, Close)
Ichimoku Kinko Hyo:
The Kinko Hyo system includes five kinds of signal, of which this strategy uses four signals i.e. Tenkan Sen / Kijun Sen Cross, price crosses the Kijun Sen, Chikou Span and Kumo. Although the Chikou Span, Senkou Span A and Senkou Span B (Kumo) are shifted into the past/future, these trigger signals enhances the strategy.
The Tenkan Sen, also known as the Turning or Conversion line, is a moving average of the highest high and lowest low over the last 9 periods in this strategy.
The Kijun Sen, also known as the Standard or Base line, is a moving average of the highest high and lowest low over the last 24 periods in this strategy.
The Chikou Span, also known as the Lagging line, is the closing price plotted 24 periods behind in this strategy.
The Senkou Span A, also known as the 1st leading line, is a moving average of the Tenkan Sen and Kijun Sen and is plotted 24 periods ahead in this strategy.
The Senkou Span B, also known as the 2nd leading line, is a moving average of the highest high and lowest low over the last 51 trading days is plotted 24 periods ahead in this strategy.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.
I am attempting to write this strategy in python, am i getting the logic right ?
1 > pine script: SenkouSpanH = max(SenkouSpanA, SenkouSpanB)
My python code:
a = senkouspana.shift(-24)
b = senkouspanb.shift(-24)
senkouspan_h = (a+b).max()
2> pinescript: longCondition = hahigh > max(hahigh,hahigh)
My python code:
df > (df + df).max()
are my logics right ?
especially long condition ' max(hahigh,hahigh) ' i tried many logic yet get an prediction error. How to interrupt this ?
Thank you emohil, will await for your reply. :)
Cheers for the script , Love from malaysia <3