cyberjunky / 3commas-cyber-bots

3Commas bot helpers, AltRank, GalaxyScore, Watchlists, Auto-Compound, TrailingStopLoss, TakeProfitIncrement
MIT License
210 stars 68 forks source link

Movecontract on ftx #90

Closed usamike25 closed 2 years ago

usamike25 commented 2 years ago

Hey first of all thank you verry much for all the great bothelpers. it really makes my life better;) i discovered move contracts on ftx, where you can trade the volatility. And i would like to try different strategies on those contracts. the problem is they expire every day so there is a new contract for every day. it is quite annoying to change every single 3commas bot pairs every day. i am a total noob when it comes to python. however i am learning. if this is something people could benefit from it would be nice if there was a "movecontractupdater.py".

thank you very much

cyberjunky commented 2 years ago

I have no idea yet how this works, which settings do you need to update to your bots daily?

usamike25 commented 2 years ago

hey thanks for replying. i think it should not be to hard, but i am just not at that level to make it myself yet. the contract is displayed as a trading pair like BTC/USDT but its called BTC_MOVE_0210/USD. and every day there is a new one. bsp next day would be BTC_MOVE_0211/US Bildschirmfoto 2022-02-10 um 13 09 56 so my question is. can this be automated since i have a multiple bots that trade this pair. and i don't want to mannualy select the new "pair". this pair works on the FTX futures account.

cyberjunky commented 2 years ago

I looked into them and saw weekly and daily pairs. So should i walk through specified bots and check if pairs are still valid for ftx, and if it's a daily pair move day up by 1, and if weekly by 1 week? With same parameters? Changing leverage bots automatically seems so risky

usamike25 commented 2 years ago

yeah that would be perfect all bot parameters stay the same only the pair updates automatically to the current day. why do you think automatically changing lev. bots is risky?

cyberjunky commented 2 years ago

I will start with a script, simply because those contracts are new to me, and I want to learn more about them, maybe you want to share your settings with me later ;) Everything with 'leverage' in a sentence is risky..

usamike25 commented 2 years ago

amazing that would help me out a lot. and if you want my settings i chan share them with you, but i dont even know if this strategy is profitable yet, since there is no real way to backtest it. and as i said i want to test a lot of differnt strategies. my strategy is mainly based on shorting volatility( i know seems stupid to short btc volatility) at specific times of the day. it is basicaly more or less a mean reversion strategy. check out https://moveproject.io/ they have stats on the move contract. i think there are so many ways to trade this contract. i will try to analyze the movecontract deeper and i want to put together a fully automated system that goes long and short the move based on time and ev other factors. and yeah leverage sounds risky, but this contract needs a lot of margin, especially when you go short. thanks again i really think there is some edge in this contract. ;)

cyberjunky commented 2 years ago

I have most of it working already, day contracts, quarterly, but what about weeks, like 'USD_BTC-MOVE-WK-0211' is it a rule that it always start on a Friday? (hence the 11)

Since these are the current valid ones on FTX:

  'USD_BTC-MOVE-WK-0211',
  'USD_BTC-MOVE-WK-0218',
  'USD_BTC-MOVE-WK-0225',
  'USD_BTC-MOVE-WK-0304',

Btw I do not check if other bots are already running with the same new pairs, I just calculate new ones from current day when I see invalid ones, so not preset on market, and assume they have expired..

usamike25 commented 2 years ago

to be honest i don't really trade the weekly or monthly contract so i cant tell you . but when it comes to daily there are allways two contracts tradable at the moment one for today and the other one for tomorrow. i will run many different subacounts on ftx with a lot of different strategies. once we have the moveupdater ;). Then collect stats on all the different strategies and deploy a combination of them all. if you also have ideas and are keen to try them on a view subacounts of yours let me know.

cyberjunky commented 2 years ago

I have put movecontracts.py online, run it once then fill in the ini file, at minimum your 3c api keys and bot inside botids.

Please test first, don't know if it runs in paper, since that uses Binance market data, not FTX's.

usamike25 commented 2 years ago

where can i find the movecontracts.py ? and no there are no paper bots for move contracts. i try wit small amounts

cyberjunky commented 2 years ago

It was not published correctly, now it is ;-) Do a 'git pull' or download new .zip file depending on installation type.

usamike25 commented 2 years ago

nice it works perfect for dailys so far ;)

cyberjunky commented 2 years ago

That's good to hear..

cyberjunky commented 2 years ago

I will close since it seems to work for you

usamike25 commented 2 years ago

hey yes it has been workin nicely. but i noticed that it would be better to update the bots once a day at 00:00 instead of an interval, because the interval starts to lag and after a view days it is significantly off schedule. thanks anyways

cyberjunky commented 2 years ago

@usamike25 Hi, good point! Can you try to set interval to 0 in the ini file (meaning it will run once) and then add it to the crontab (if you run on windows the scheduler) to run at 00:01 every night?

usamike25 commented 2 years ago

hey as of now i fixed it with a scheduler works fine goes trough all bots at 00:00:0 Bildschirmfoto 2022-02-28 um 18 58 16

cyberjunky commented 2 years ago

That's nice! Will include it in code for this script since the timer is not suitable.

usamike25 commented 2 years ago

cool maybe you know how to make this timezone independent. i could not figure it out. thats why my update time is set to 01:00. when the contract expires in my timezone

cyberjunky commented 2 years ago

Did you try specifing your timezone in the movecontracts.ini? timezone: Europe/Amsterdam

usamike25 commented 2 years ago

yes. it does not work, i dont know why.. may be this schedule module gets the time from the system.

usamike25 commented 2 years ago

sorry i tried it again it works lol.. in my own script id did not haha

usamike25 commented 2 years ago

so the scrip should be running perfectly fine if we set (timezone: UTC) and the scheduler to 00:00

cyberjunky commented 2 years ago

Thanks I updated the code!