andresilvasantos / bitprophet

Node crypto trading platform for Binance exchange.
MIT License
228 stars 70 forks source link

Set multiple markets to same strategy #22

Closed pabloaugusto closed 6 years ago

pabloaugusto commented 6 years ago

Will be great have a way to use same strategy to many maskets. Duplicate the strategy file it not much productive

Ex:

buydip: { name: "Buy Dip", paperTrading: false, buyAmountMarket: 0.001, profitTarget: 1.5, maxLoss: 0.5, maxTradingPairs: 5, targetMarket: ["BTC","ADA","ONT"]

}

andresilvasantos commented 6 years ago

The markets in your array, except for BTC, don't exist in Binance. You're probably talking about multiple tokens from the same market. With targetMarket set for BTC, it will target all the tokens from BTC market.

andresilvasantos commented 6 years ago

I'm going to close this issue, but feel free to comment again and I'll reopen it if needed.

pabloaugusto commented 6 years ago

Yeah, i mean multiple tokens. So, must be great a have basic documentation how about this bot works, the "examples" not have no single comment or basic explanation of the functions and system logic. Anly plans to add something like this?

if i want just made a strategy with one token, its not current possible? I can set a single token to my strategy?

andresilvasantos commented 6 years ago

It is possible to create a strategy for a single token.

Just set targetTokens to the tokens you need:

buydip: {
name: "Buy Dip",
targetTokens: ["ADA","ONT"],
//...
}

With time, the documentation will be improved. If you read carefully the code for all strategies, you can see the logic is pretty simple.

There are 3 base functions for all strategies:

I hope this will help you, and an effort will be made to document everything and have comments through out the code.