-
Notifications
You must be signed in to change notification settings - Fork 3.9k
How could we make a better strategy based on multiple indicators? #1275
Comments
That sounds like a great strat, and yes definitely this is a very easy and doable strategy! This is all information you need to know how to create it: https://gekko.wizb.it/docs/strategies/creating_a_strategy.html |
I'm messing with it right now. The backtesting on this strat with two indicators plus 'bbands' from TAlib is bizarrely slow, anyone knows if this is normal? If TAlib has such bad performance we should make a BBands indicator... |
Talib is a disgrace speed wise. Write BB as a native and it's super speedy. |
Yes, native BBands runs normally..
|
Hello all, I was implemented the scheme This is my current js code Currently, I did not combine the BBands scheme. @Gab0 : Could you guide me how can I combine it in the above code? @askmike : How about my implementation for combination of two StochRSI and MACD? This is my setting
|
1- that file I posted is BB.js and should be put in strategies/indicators
3- now to the strategy file (create at
4- settings:
add this entry "bbands" with its children to your settings and that's it. |
@Gab0: Great. It worked well. Now I can get the upper, middle and lower value of BB. For current trades, we will have a green/red (buy/sell) column. For example, the current trades make a green column as the attached figure. Do you know how we can know the column will intersection with upper/middle/lower line. For the figure, the column is interesting with middle line. I am writing the figure in strategies to determine it. Thanks |
@John1231983 Well, if the close value is below the lower line, or above the upper line, there is a intersection. Its just like |
Great. I got it. I am thinking about the number of intersection likes persistence. For example, if the intersection with the upper line is so much, we will think it will be in the downtrend. It likes a threshold value. I guess we use it will be safety. For value, I think we must carefully do it in backtest. I was got 11.5 % profit when I apply combination between MACD and StochRSI for trading BCH from yesterday :) |
hi there,
Any hints ? here's the code :
and
|
Hi, I have update it. Let's check again. Rename the file to
Note that, I run in terminal not UI |
@Gab0: I think the intersection between price and the middle line is not so good. We must compare with the median value of price. I think the line (as attached) has high/low/median value. Do you know how can we get the median value (center of line), instead of And this is definition of box plot |
@John1231983 This may be just |
@John1231983 is it possible to share those scripts? I am using bbands via Talib:
this produces NaN for both bbands.result.outRealUpperBand / bbands.result.outRealLowerBand |
I see. I used another bbands as Gab0's answer. You just changed one thing in new version of gekko that is adding input: 'price' in the BB file. That is full code. If you have a good strategy. Welcome to share it
|
Hi noob question here how do you configure gekko to show a candlestick chart? Ps any chance someone could walk |
Me through the setup? |
@John1231983 @Gab0, your BB.js code is helpful. Thanks for sharing that. However as per this we must use the closing price of the candle and not the trade price, as done in your example ( |
I personally would use talib - I am busy setting up a multi-strategy bot using Gekko. For Talib you need the following:
and config:
You would then access the values like the below (note, I have custom code, so you will need to rework some):
I am using a number of strategies with different indicators - it looks something like this (using DAT/USD): |
@thakkarparth007 While when using trading exchange APIs directly the candle.close and price value are different (price is real time price, C.C. is the close of last full 1m candle), inside Gekko strats they are exactly the same.. Gekko extracts the price from candle.close; |
@Gab0 cheers for the info would be useful to identify what indicators to use and confirm gekko is reporting the same as tradingview etc |
@John1231983 I wanted to try your strategy but I'm getting this error when it attempts to calculate values. Any ideas?
|
@John1231983 I am redoing your idea from scratch. I have started writing the BB.js and placing it inside the strategy/indicators. This is the code:
Now I am working on implementing the strategy. |
Good. Please share your strategy when it completed |
@okibcn also interested in this! I can help testing it |
@John1231983 @okonon I have created a pull with the three required files for the BB: You can find the pull with the three files here: #1623 It depends on @askmike to include it in the main or devel release. The Strategy is very basic, it advices long (buy) when entering the BBand from below and it advices short (sell) when entering the band from above. The default BBand uses a window of 20 candles and the distance from the average to the up and down bands is 2 standard deviations. Let me know your experiments. With narrow bands it is more profitable to reverse the short and long signals. I am thinking in including that special condition in the strategy. What do you think? |
@okibcn: Great to see your result. However, I think we need to consider MACD also because BB may not enough. The MACD rule as: -Sell: Downtrend and has intersection between buy and sell Do you think so |
@John1231983 Next step will be to add MACD as a joint strategy file and then also RSI. However, when adding all three as a requirement, then it is going to be very difficult to have a buy or sell advice. |
@okibcn : You are right. However, we have a safe trading :D |
Utilize the below to check the times and UTC match up. I noticed my UTC was set differently on gekko then the charts I was comparing against.
|
Hi Guys, I need an advise. |
hey guy can anyone please help ? 2018-02-21 12:56:00 (DEBUG): Requested XRP/BTC trade data from Binance ... How do i make it trade now ? because it seems like its just giving output on the shell . Am i missing something ? Please help . Thanks so much |
@mseewooth Start it on the command line : and have patience. if 15 min candles, it takes 30+ min before you see something happen. |
@Jabbaxx Do you mean i used the default configuration ? |
Keep the config you have. I think you are missing this : config.paperTrader = { |
Alright so below is my configs : CONFIGURING TRADING ADVICE STRATEGY PLUGIN TRADER Please advise @Jabbaxx |
Is there not missing what coins you want to trade ? But iun your outpout it looks ok. Otherwise I can not see what is wrong. Maybe just have patience till it buys something ;) Better start a new thread instead of hijacking this ;) |
:) i'm trading DGB/BTC Binance. |
PLEASE Is this code java script? Or is it embedded java? Why is it so difficult to add code or is it? Thanks |
@Igi90 contact me mail [email protected] or telegram @seif12 |
Its easy to make a profitable strategy. The real question is how profitable? |
@dmaxjm for me profitable mean that in a certain period running the strategy is better than simply holding i.e if i hold x amount in btc my strategy is profitable if in the same period i will end up with a balance equivalent to y > x in btc |
@seif12 Higher than this? On BTC Or this? I got a few strategies.... I want a short term one. Most of mine end up being long term. |
if you just hold during that period you would made 100% even with that big correction, but this one look great which one is it ? |
Actually, if you look at the picture is 128% market. |
Yeah , Nice one |
I posted up in the other article giving advice on how to backtest multiple variables using python. Hoping someone out there has a good short term strategy in return. :-) Try checking the best trading strategy Poll in here. |
Thanks link ? |
@dmaxjm nice script dude can you help me use it to optimize this strategy i will share code with you |
Sure. Send me an email @ [email protected] |
@dmaxjm @seif12 is it possible to share the scripts, maybe as Gist, with the required parameter to run it? |
@ John1231983 Hi, thanks for your work and also for make this thread. Are you using your strat? Can you share us some test? I want to use Gekko with this same strategy because it is one of my favs crypto-trading strategys. Really I do not know how to implement it on my system files, maybe someone can help us a little. I can test and share some trading tips, I do not have knowledge on programming. Thanks for everyone that helped in this thread. Good comunity! |
@John1231983 @Gab0 thanks for your great work. It helped a lot! |
Thank you all for great ideas and strategies improvements. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you feel this is very a important issue please reach out the maintainer of this project directly via e-mail: gekko at mvr dot me. |
This is not an issue. Just the idea to make better sell or buy.
To make a better decision, I will base on three indicators: Bollinger Bands (upper line, middle line, and bottom line), MACD, and Relative Strength Index as shown from top to bottom of the below figure.
Buy decision must satisfy three conditions:
Sell decision must satisfy three conditions:
Could we make a custom Strategy from the condition? Thank you
The text was updated successfully, but these errors were encountered: