Closed rrfaria closed 3 years ago
Hi @rrfaria, You can create a custom class with iqoption operations like this: https://gist.github.com/rodrigo-brito/8c82020f04e946e3f0c39c7243cfe1ee. In the code, you can create an instance of this custom class in the constructor of your strategy and execute the buy or sell function instead of backtrader built-in functions.
The main problem is the data feed. You should create a class which provides some fields: https://www.backtrader.com/docu/datafeed-develop-general/datafeed-develop-general/
thanks @rodrigo-brito
but if I use this class on strategy I'll not lose boker functionalities ?
I need mensure if it is getting profit or not ?
iqoption uses spread on forex and crypto I would like to use a strategy where use it as a important property to do buy or sell because some time when spread is too high doesn't compensate do any thing and it is hold time
I found oanda code: https://github.com/ftomassetti/backtrader-oandav20/tree/master/btoandav20
he implements store, broker, sizer and feed I tried to read backtrader docs but it is not so clear
there is a open source api witch give us realtime data https://github.com/Lu-Yi-Hsun/iqoptionapi
and there is a entire group trying to develop their on bot with different strategies https://t.me/joinchat/OiGH3w5ceyvVxK8SFqV50g
so if I could create it it can help a lot
I was taking a look on your code and it is pretty good but it is to binance
I need use it in iqoption as a broker there is a community behind iqoption trying to use iqoption api but no one know how to put it on backtrader
do you know how to create a broker on backtrader Is there any video on internet about it ?