[BOUNTY] Transform a Pine Script indicator to a Gekko indicator
#9
Hi,
I added the initial version of the Tom Demark's Sequential indicator and created a simple strategy that uses the new indicator. You can get them here:

https://github.com/MeanSquaredError/gekk...f46ee4bbaf

The internal organization of the TradeView scripts is quite different from the Gekko's internal structure. TradeView displays charts that span a relatively large interval, while Gekko's indicators and strategies are focused on the current moment.

So it is not a direct port, but rather a new implementation of the Tom DeMark's indicator while using the original TradeView script as a reference. Functionally the TradeView script and Gekko's indicator should be equivalent.

One noticeable difference from the indicator as invented by Tom Demark and the TradeView's script (and Gekko's indicator) is that the original indicator requires an initial bearish/bullish flip at the start of the sequence while the TradeView (and Gekko's) strategy don't require the initial flip.


When running the trader, paper trader or backtesting the strategy name is TDM_SEQ.

The candle size can be any size that you want. I was testing it with 1 minute and then with 1 day, but any candle size should do (I guess it mostly makes sense to use 1 day as candle size).

The Warmup period doesn't really matter - the strategy only starts giving advices when there is enough data, so you can safely set the warmup period to 1.

You can watch the debug output in the console. All the messages from the TDM_SEQ strategy are prefixed with "TDM_SEQ(s)".

There are debug messages from the indicator prefixed with TDM_SEQ(i)", but these are commented out. If you can uncomment them in the indicator file, if you want more information about the internal functionality.

Basically the strategy just watches for TDM BUY and issues a "long" advice, or TDM_SELL and then issues a "short" advice. I gave it some limited backtesting and it seems to be detecting the patterns correctly but it really needs more testing.

So everyone is welcome to test it.
  Reply


Messages In This Thread
RE: [BOUNTY] Transform a Pine Script indicator to a Gekko indicator - by MeanSquaredError - 02-06-2018, 09:47 PM

Forum Jump:


Users browsing this thread: