Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turtle trading strategy added. #109

Merged
merged 3 commits into from
Mar 19, 2022
Merged

Conversation

gunebakan
Copy link
Contributor

What have you changed and why?

Turtle trading strategy added. (https://www.investopedia.com/articles/trading/08/turtle-trading.asp)

Related Issues

Link related issues here.

@codecov-commenter
Copy link

codecov-commenter commented Mar 16, 2022

Codecov Report

Merging #109 (b7cd94e) into main (5bb2fda) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #109   +/-   ##
=======================================
  Coverage   49.88%   49.88%           
=======================================
  Files          15       15           
  Lines        2211     2211           
=======================================
  Hits         1103     1103           
  Misses       1045     1045           
  Partials       63       63           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5bb2fda...b7cd94e. Read the comment docs.

Copy link
Owner

@rodrigo-brito rodrigo-brito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks great, thank you.

examples/backtesting/main.go Outdated Show resolved Hide resolved
examples/strategies/turtle.go Show resolved Hide resolved
@rodrigo-brito
Copy link
Owner

Awesome results, it looks a great trending following strategy. Huge payoff.

+---------+--------+-----+------+--------+--------+----------+-----------+
|  PAIR   | TRADES | WIN | LOSS | % WIN  | PAYOFF |  PROFIT  |  VOLUME   |
+---------+--------+-----+------+--------+--------+----------+-----------+
| BTCUSDT |     11 |   4 |    7 | 36.4 % |  6.985 |  5589.10 | 128796.84 |
| ETHUSDT |     13 |   7 |    6 | 53.8 % |  2.662 |  4956.29 | 129456.71 |
+---------+--------+-----+------+--------+--------+----------+-----------+
|   TOTAL |     24 |  11 |   13 | 45.8 % |  4.644 | 10545.39 | 258253.55 |
+---------+--------+-----+------+--------+--------+----------+-----------+

--------------
START PORTFOLIO = 10000.00 USDT
FINAL PORTFOLIO = 20545.39 USDT
GROSS PROFIT    =  10545.388134 USDT (105.45%)
MARKET (B&H)    =  407.84%
MAX DRAWDOWN    =  -24.53 %
VOLUME          =  258253.55 USDT
COSTS (0.001*V) =  258.25 USDT (ESTIMATION) 
--------------

@gunebakan
Copy link
Contributor Author

Hi Rodrigo,
Do you have time to check the latest changes and commit if there is no problem?

Copy link
Owner

@rodrigo-brito rodrigo-brito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution

@rodrigo-brito rodrigo-brito merged commit 985ba6e into rodrigo-brito:main Mar 19, 2022
@gunebakan
Copy link
Contributor Author

Hi Rodrigo,
Do you have plan for new features?
"Roadmap
Include trailing stop tool
Stop Orders in backtesting"

@rodrigo-brito
Copy link
Owner

Sure, I will create a clean roadmap.
I have some ideas, for example:

  • Support Futures Market (Long / Short)
  • Support other exchanges (Bitmex, FTX, etc)
  • Include a hyperopt (tunning parameters)
  • Include a live chart (display candles and orders in real-time)
  • Improve backtesting with new metrics (avg trades, avg time, sharp ration, etc).

I will create more issues to discuss these ideas.

Do you have some suggetions?

@rodrigo-brito
Copy link
Owner

I created a roadmap for indicators: #110

@gunebakan
Copy link
Contributor Author

I will try to start with basic indicators. If you will start any of them:
Support Futures Market (Long / Short)
Support other exchanges (Bitmex, FTX, etc)
Include a hyperopt (tunning parameters)
Include a live chart (display candles and orders in real-time)
Improve backtesting with new metrics (avg trades, avg time, sharp ration, etc).

Just let me know if I can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants