Hi everyone,
I'm new to zenbot and interested in writing a strategy. I've been reading some of the code, and it's not super clear to me exactly what I have to do to write a strategy, and what all of the knobs and levers are.
What I've figured out so far (please correct any mistakes I make):
On every period, the system pulls calls calculate for each trade (these trades are the trades that happened on the exchange?).
After calculate, onPeriod is called. onPeriod is finished by invoking the cb function, and the strategy communicates to the engine by setting the acted_on_trend, signal, plus other fields on the ctx object passed.
Once a signal is sent, the engine either buys or sell.
Are there more docs around exactly what the engine looks for on each period and how it reacts? Plus, the behavior of cancels and how purchases are executed/given up on are a little cloudy, too.
Any help is appreciated, thanks!
-Sam
I'm in the same situation. I started looking at it yesterday but it wasn't super clear to me either. Maybe there could be a "dummy strategy" that uses Math.random() to buy/sell randomly or something similarly simple?
Closing due to inactivity.
I know this is closed but any documentation, writeup etc. on how to write a new strategy would really help people in the wild. Thanks.
Would help me too, a dummy strategy like @josteinaj mentioned aboven.
This really should be done. 2 years later people still wonder how to create new custom strategies (including me).
Most helpful comment
I know this is closed but any documentation, writeup etc. on how to write a new strategy would really help people in the wild. Thanks.