macd - signal crossover wanted
#1
Hi all,

Just started with Gekko and I'm looking to create a very simple strategy:
- if macd crosses signal while going up: buy
- if macd crosses signal while going down: sell

I tried to "hack" together a custom strategy, but I'm having difficulties getting the values for EMAshort(12), EMAlong(26) and signal(9) as such so I can use them in a the above mentioned crossovers.

I can't seem to find a strategy that does this, it's probably out there and I don't know what to look for or it's not since it is a foolish strategy... I don't know which..

To be honest, I'm quite new to java programming and strategies... but I would still like to see what happens with such a strategy and gain some experience programming it.

Can anyone point me in the right direction please?

Thanks!
  Reply
#2
Anyone? Or is this just a too bad of an idea for a strategy... telling me that would also help me ;-)

Thanks!
  Reply
#3
Is what you want different from the build in MACD strategy?

- You can find the implementation here: https://gekko.wizb.it/docs/strategies/in....html#MACD
- You can find the description here: https://gekko.wizb.it/docs/strategies/in....html#MACD
  Reply
#4
Thanks,

To be honest, I'm not quite sure.... I have a feeling het "default" MACD strategy is based on a trend, whereas I would like to perform an action based on the MACD crossing the signal line.


[Image: J5jPtMA]  [Image: LRF9ATV]

.. or is this what the MACD strategy does?


Attached Files
.png   Selection_999(093).png (Size: 1.85 KB / Downloads: 18)
.png   Selection_999(092).png (Size: 3.61 KB / Downloads: 13)
  Reply
#5
(08-11-2018, 02:52 PM)wilbertvdl Wrote: Thanks,

To be honest, I'm not quite sure.... I have a feeling het "default" MACD strategy is based on a trend, whereas I would like to perform an action based on the MACD crossing the signal line.


[Image: J5jPtMA]  [Image: LRF9ATV]

.. or is this what the MACD strategy does?

Did you find out how to do it? I need to do same with MA's 
  Reply
#6
No, not really, I've abandoned this idea and am looking into other existing strategies...
  Reply


Forum Jump:


Users browsing this thread: