Ekliptor / WolfBot

Crypto currency trading bot written in TypeScript for NodeJS
https://wolfbot.org
GNU Affero General Public License v3.0
710 stars 215 forks source link

BitMex Backtesting #14

Closed Lucky21110 closed 5 years ago

Lucky21110 commented 5 years ago

Hello

Anyone can help me for Bitmex Backtesting ?

image

It doesn't work for me ... any idea?

Thank you

Regards

Lucky21110 commented 5 years ago

I tried also to import data and it doesn't work

image

Same if I add --exchange=Bitmex

Ekliptor commented 5 years ago

as stated in the readme you must add --noUpdate as start parameter

Bitmex importing trades is a bit difficult since the import depends on contract date, not just currency. I suggest you use an esier regular exchange for backtesting

Lucky21110 commented 5 years ago

Hello,

Ok thanks. image

Can I only import XBT ?

Regards

Ekliptor commented 5 years ago

It can always only import 1 currency at a time. The problem with importing futures is as mentioned that it requires the futures expiration date as a parameter usually.

See importHistory() in BitMEX.ts. Feel free to modify it ;)

Lucky21110 commented 5 years ago

Ok so I should be able to import only XBTUSD as perpetual contract right ?

I tested to do that but same thing image

Ekliptor commented 5 years ago

its working for me. Your error "importing multiple currency pairs" indicates some other config problem... But as I said: easier to try another exchange first for basic backtesting and use bitmex only to fine-tune parameters

Lucky21110 commented 5 years ago

Can you share you currrent config file plz ? I set Okex and Poloniex and tried Binance but doesnt work as I see Symbol Incorrect. I tested multiple symbol format also

Regards

Ekliptor commented 5 years ago

Try selecting a config with ONLY 1 exchange (or create a new file that only contains 1). Poloniex has very fast imports. Also see https://forum.wolfbot.org/threads/importing-large-amounts-of-trades-for-backtesting.4/

fractalawareness commented 5 years ago

I've got the same Bitmex error, haven't figured out the reason yet. Bitfinex forks fine.

Lucky21110 commented 5 years ago

Hello,

Here is my config

image

Ekliptor commented 5 years ago

I just committed an updaste to BitMEX.ts with more logging during imports. So you should see if he is even starting to import anything.

Using a config that imports BTC_USD from Bitfinex should also work on BitMEX (by just changing the exchange name).

@Lucky21110 that config looks fine. Just 1 pair and that's available on BitMEX. edit alternatively try the manual imports, see link above

Lucky21110 commented 5 years ago

Thank you Ekliptor I ll try it today and keep you posted.

Lucky21110 commented 5 years ago

Hello Ekliptor,

Unfortunately it doesnt work... Please check below screenshot When I click on Backtesting

image image

Thats the result if I try to run the import. image

Any idea ?

Thank you

Ekliptor commented 5 years ago

as seen in your first screenshot, BitMEX auto imports are not supported (because of contract lengths). Please use the manual import method with command line args i linked to in the forum. After you imported the data for your desired time period, you can run a backtest immediately

Ekliptor commented 5 years ago

assuming it solved Please also read the general notes on Backtesting: https://forum.wolfbot.org/threads/backtesting.20/

Lastly I want to add that one advantage of the cloud version is, that there are already many month of Backtesting data available for major currency pairs.