Gekko Forum
Schaff Trend Cycle - Printable Version

+- Gekko Forum (https://forum.gekko.wizb.it)
+-- Forum: Gekko (https://forum.gekko.wizb.it/forum-13.html)
+--- Forum: Strategy Development (https://forum.gekko.wizb.it/forum-12.html)
+--- Thread: Schaff Trend Cycle (/thread-56716.html)

Pages: 1 2 3


RE: Schaff Trend Cycle [BOUNTY] - Henry151 - 04-13-2018

zschoro,

When I go to backtest your strategy, I'm seeing on the right (in the UI) a section that says Parameters and has these options:

threshold_buy = 1.0
threshold_sell = -1.0
method = 'adadelta'

learning_rate = 1.2
momentum = 0.9
decay = 0.10
stoploss_enabled = false
stoploss_threshold = 0.85
hodl_threshold = 1.2
price_buffer_len = 100
min_predictions = 1000

and it confuses me! I tried to review the strategy code itself and I don't see any reference to any stoploss or hodl_threshold and I'm confused. Any guidance on what these parameters are?


RE: Schaff Trend Cycle [BOUNTY] - Gryphon - 04-13-2018

Those Parameters look like a set for a neural network strategy... I don't think they're the right ones for Zschoro's STC at all

I adapted his STC calculations into an indicator to use with other strategies:
Indicator: https://github.com/RJPGriffin/gekko/blob/develop/strategies/indicators/STC.js
Strategy: https://github.com/RJPGriffin/gekko/blob/develop/strategies/STC.js
Toml: https://github.com/RJPGriffin/gekko/blob/develop/config/strategies/STC.toml

Zschoro pointed out on discord again that to use it in a strategy you need to account for the times that it peaks about half way and drop again - the linked strategy doesn't account for that.


RE: Schaff Trend Cycle [BOUNTY] - z.schro - 04-13-2018

I updated my strategy, and included a stop loss.
Would someone mind doing some backtesting on it?
https://github.com/zschro/GekkoSchaffTrendCycle

Thanks,
Zack


RE: Schaff Trend Cycle [BOUNTY] - ManuManu - 04-14-2018

Now my question is:
Gryphon, how did you graph that ?

Having some graph is really something that would help with Gekko !


RE: Schaff Trend Cycle [BOUNTY] - z.schro - 04-14-2018

(04-14-2018, 12:01 AM)ManuManu Wrote: Now my question is:
Gryphon, how did you graph that ?

Having some graph is really something that would help with Gekko !

Yes Thank you so much for helping and testing Gryphon!
The graph is super helpful.


@henry sorry for the previous mistakes with my toml file i have fixed it

If anyone is able to run this through one of the genetic algo things to get an idea of good parameters I'd really appreciate it.


I added a stop loss and also I account for the false signal now too (the thing where it goes up midway past the threshold, but then drops right back down).


RE: Schaff Trend Cycle [BOUNTY] - z.schro - 04-14-2018

enable_stop_loss = true # use or don't use the stop loss
stoploss_threshold = 5 # percentage below the last high seen from a long that you should sell


when adjust_false_signal is enabled if you get a false signal - meaning the indicator went past the threshold into the middle, but then went right back before crossing the other threshold.

adjust_false_signal = true
threshold_adjustment = 5


RE: Schaff Trend Cycle [BOUNTY] - Henry151 - 04-14-2018

z.schro,

when I try to backtest yours, I am getting an error saying "failed to load indicator" .. Did I perhaps put the indicator in the wrong spot? I'm putting https://github.com/zschro/GekkoSchaffTrendCycle/tree/master/strategies/indicators these two files in gekko/strategies/indicators and the toml file in gekko/config/strategies, and then of course https://github.com/zschro/GekkoSchaffTrendCycle/blob/master/strategies/SchaffTrendCycle.js this file in gekko/strategies ... is that right?

--EDIT--
solved it, I had accidentally STC.js and STC.js.1 in /strategies/indicators and that was somehow messing things up, simply removing STC.js.1 (which was gryphon's version of the indicator) seemed to solve the problem


RE: Schaff Trend Cycle [BOUNTY] - Kris191 - 04-14-2018

I will run this through GekkoGA later today i will only test from Feb to today as the bull run over December and Jan really throw out the numbers


RE: Schaff Trend Cycle [BOUNTY] - Gryphon - 04-14-2018

My graphing is rather basic... I write everything I want out to a .csv file each check, then open it in excel and graph it out. I kinda think there must be better ways, but it does work.

Check the strat here: https://github.com/RJPGriffin/gekko/blob/develop/strategies/STC_Compare.js The write out is at line 69.


RE: Schaff Trend Cycle [BOUNTY] - rob2112 - 04-14-2018

Gryphon, the plot trick is amazing. Thanks for sharing!