Comments (11)
technical/technical/indicators.py
Lines 245 to 260 in 9924ee4
please do not use chikou span ... it's simply the candle's close shifted 26 periods into history.
This means, a strategy using chikou span will look ok on backtesting - but will fail in every live / dry run scenario, as it is not available for the latest 26 candles.
You can insteda simply use dataframe['close']
- which is exactly the same, but without displacement (ichimoku is mainly a visual indicator - good to look at in charts, tricky to use in strategies).
from technical.
Thank you very much. Thank you very much.
Yes I agree with you ichimoku is very visual but I'm just testing out of curiosity by comparing with other strategies.
If I understood correctly, is it the same problem with senkou_a and senkou_b? If I do:
dataframe['senkou_a'].shift(-26)), does that return the value to -26?
Apparently in the indicator code you put: senkou_span_a = leading_senkou_span_a.shift(displacement) with "displacement = 26". I should do it instead:
dataframe['leading_senkou_span_a'].shift(-26)), right?
Thanks for your help
from technical.
shifting it back won't work - the "forward-shifted" candles are removed as they fall out of the index.
You should be able to use the leading_
- but look very carefully at the last few candles of the dataframe for which fields have values (and which ones).
I don't use ichimoku myself, so i can't really help you very well.
from technical.
I'll close this as i hope you found what you were looking for.
Feel free to comment below if you're still struggling with ichimoku.
from technical.
Hi @xmatthias , looking at the code here
technical/technical/indicators.py
Line 273 in 9924ee4
it is simply a displacement 26 candles into future ( or , toward the right hand side the graph as seen in trading view ) .
So , if we were to find out if current close is above green cloud that is about to form in trading view, this should do the trick:
- Copy the ichimoku function
technical/technical/indicators.py
Line 245 in 9924ee4
- Remove these two lines in order to avoid dropping them off the index
technical/technical/indicators.py
Lines 273 to 275 in 9924ee4
- Simulate trading view's comparison of current close above a cloud that is forming 26 candles into the future by doing this:
(dataframe['senkou_span_a'] > dataframe[senkou_span_b]) # green cloud
& (dataframe['close'] > dataframe[senkou_span_a]) # close is above green cloud
Does the above sound right?
from technical.
No it does not.
The "shifted" spans will not be dropped within the ichimoku function, but when you merge/assign them to the original dataframe.
The function returns leading_senkou_span_a
and leading_senkou_span_b
as seperate columns - which are the ones that are not displaced, so comparing them directly will tell you exactly what you're looking for in your screenshot.
from technical.
Thankyou, that makes sense. Is there a way I can access ichimoku within populate_buy_trend without using dataframe merging?
from technical.
Alternatively, i think we can do the comparison within the populate_indicators function and store only the result.
from technical.
You get the non-shifted indicator.
For "machine" comparison, that will suffice (it's actually exactly what you want).
While it may not look that nice on charts - it's exactly what you needed.
The shift of the original indicator may look nice on charts - but is unusable as is for machine comparisons.
Not merging will fail as the dataframes are then of different length (or will be shifted).
from technical.
Hello, there may now be any way to occupy chikou in a real time trading strategy with freqtrade? I would like to try to use the indicator but I can only do it through backtesting. @xmatthias @berlinguyinca @shroukkhan
from technical.
There is nothing more to say than the comment in the docstring:
technical/technical/indicators/indicators.py
Lines 26 to 33 in 367142a
Which also explains why you "can" use it in backtesting (and probably get good results) - but not in live.
from technical.
Related Issues (20)
- Trend Step Channel - appreciate it HOT 4
- resample_to_interval date shifted HOT 1
- Help with Trend Trader Strategy HOT 1
- ichimoku different value proposal HOT 1
- How to import external data to populate entry/exit trend conditions HOT 14
- Multiple timeframe merge HOT 10
- Laguerre RSI wrong computation HOT 3
- ```crossed``` function throws error with numpy integers
- utils bug HOT 4
- How to plot segtrends or gentrends using freqtrade plot-dataframe ? HOT 1
- Phase Change Index HOT 18
- I try to convert Predictive Ranges [LuxAlgo] to the py, whats the problem? HOT 7
- Involvement of Heikenashi candles could be helpful in trend prediction HOT 1
- Help needed with: AttributeError: 'SSL' object has no attribute 'copy' HOT 3
- warning util.py
- 16 tests failed HOT 4
- Pandas warning when setting fillna(0) on RMI calc HOT 2
- Issues with PMAX indicator HOT 1
- A few Pinescript lines HOT 2
- Error thrown at numpy_rolling_window HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from technical.