Gekko Forum
My idea -- I need your input on a simple/basic code - 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: My idea -- I need your input on a simple/basic code (/thread-57997.html)



My idea -- I need your input on a simple/basic code - db071 - 09-03-2019

Hi all,

I am active in the forums here, so I'm posting this as a last resort at not being able to find anything else.

I am not much of a coder.  So my question is this:

Is there a pre-existing strategy for this, or can someone provide be with basic code layout for a .js strategy and .toml config please?

I simply need this as a building block.

SO!

I need to code a strategy that will sell at exactly 1.48% profit from last buy price on GDAX (coinbase pro).  After that sell, I need it to buy at -1.48% of the current price.  And so on, and so forth.

Any ideas?


RE: My idea -- I need your input on a simple/basic code - PGTART - 09-03-2019

as far as i know, you dont know the exact buy price (as its not the last candle.close).
But most of the time i just use the last candle close, and put it in this.boughtAt

If your interested in gekko you should learn to code with it, otherwise it wouldnt make sense (why an interest in bots if you cannot make use of them).
It took me a few days to understand jscript, i think what i posted just a few days ago could be a nice layout to get you started (download visualstudio Code)
for bracket problems and nesting problems use document format in vs code, so you quickly see where you went wrong. It will not take you weeks to learn to code, coding is more easy then you might realize, its not as complex as the english language for example.