Problems with coding my strategy
#1
Hi

Congratz on new forum!

I have been trying for days \ weeks now to "program" the standard DEMA strategy like i want it. But cant seem to get it right and i have deleted all and trying to start all over again. Would be soooo gratefull if you could help me. 

So i have a clean standard DEMA strategy from you when i download right now. 

Im using Gdax for my exchange. I would like to use ema 12 \ ema 26 like its shown on gdax. 

My meaning about uptrend is when ema 12 is greather then ema 26, same with downtrend when ema 12 is less then ema 26


My problem and what i want the bot to do is: 
When ema 12 crosses ema 26 in a downtrend and ema 12 is 50 less then the crosspoint SELL,
So its not about the marketprice but about the crosspoint of the emas. . forexample if ema 12 crosses ema 26 at 12.000 i would like to sell at 11 950. But if  it dosent hit 11950 i dont want it to sell.

Same when buy: When ema 12 crosses ema 26 in a uptrend and ema 12 is greather then the crosspoint BUY. 
So if ema 12 crosses ema 26 in a uptrend at 12000 and ema 12 goes up to 12050 it BUYS. 


And when this is corrent, i would like the bot to buy and sell with limits.  Hope you can help


Do you have any soloution for me? cause im going crazy :p Huh


Attached Files
.png   my toughts.png (Size: 107.08 KB / Downloads: 38)
  Reply
#2
Hi lasseb,
There is no need for you to re-write the strategy as it works just the way you have described it, you just need to adjust the parameters to the ones below:

short = 12
long = 26

[thresholds]
down = -0.005
up = 0.005

The thresholds stops the system from selling at the crossover but waits for a threshold, (in your case it would be 0.5%). This would mean that when it crosses at 12,000 it would not buy until it reaches 12,060 and similarly it would not sell when the lines cross again, but wait for it to go under by 0.5%.
  Reply


Forum Jump:


Users browsing this thread: