nefertiti icon indicating copy to clipboard operation
nefertiti copied to clipboard

Introduce setting to set maximum number of orders or maximum allowed total price/funds

Open hotzenwalder opened this issue 3 years ago • 2 comments

I would like to suggest a feature where we can do a couple of things.

The Nefertiti bot will keep placing buy orders as long as there are funds available to place orders. Would it be possible to specify a parameter for the maximum number of open buy orders, for instance --maxbuy=4 to limit the bot to 4 total buy orders. Since most people are trading more than one pair maybe it should be possible to set this limit per trading pair

I would also like to have a feature introduced that respects the maximum amount of funds available for orders either by looking at the currently available funds in your wallet or by specifing a maximum amount of funds to use in total for instance with --maxfunds=2500 to set the limit at 2500 USDT in total. Since many people use more than one pair to trade we might think of introducing such a limit per pair.

Since all these options are usually global over all trading pairs when using them as a commandline option I would like to suggest introducing a settings file/ini file for trades. The bot would pick up this settings file and start the different trades using the settings from the settings file

Example

exchange,market,dip,pip,price,top,maxfunds,maxorders,etc WOO,SPOT_WOO_USDT,5,30,10,2,1000,4 WOO,SPOT_BNB_USDT,2,10,500,2 WOO,SPOT_ADA_USDT,,,,200,

Where values are left empty the default is used for the bot. In this example I set all the settings for the WOO exchange because I think it will be hard to have just one settings file when trading multiple exchanges because you would have to include the API keys/secrets in the settings file or create another settings file where you could store the API keys per exchange and pushover keys etc

It's just a though and as I am brainstorming about it I think what you might consider is a geneal settings file with overall settings for the bot for instance

nefertiti.ini

[default] dip=5 pip=30 top=2 strict=Y

[exchange_woo] api_key= api_secret= dip=5 pip=10 top=1 strict=N

[exchange_binance} api_key= api_secret= dip=2 pip=10 top=1

This would be the default settings file and then you could introduce another settings file per exchange

exchange_woo.ini

[SPOT_WOO_USDT] dip=3 pip=10 top=2 maxfunds=1000 maxorder=2 stric=Y earn=Y

[SPOT_ADS_USDT] dip=3 pip=10 top=2 maxfunds=1000 maxorder=2 earn=Y strict=Y

just some brainstorming on my part about how to introduce some features to limit the maximum amount of funds the bot will use and the maximum number of orders and if you want to be more flexible a possible solution to be way more flexible in the way you are running your bots and pairs with seperate settings without having to run a bot per pair (hopefully)

For now the most usefull for me would be a better check on funds and a limit on the maximum number of orders per pair The first one so we could also avoid the error 'not enough funds'

hotzenwalder avatar Oct 28 '21 09:10 hotzenwalder

thank you for your input @hotzenwalder ! multiple features requested:

  1. max number of purchased orders PER TICKER/PAIR
  2. max amount of funds spent PER TICKER/PAIR
  3. explore have NEF reference a settings file as an alternative to multiple NEF 'BUY' command lines

TaipeiHere avatar Nov 03 '21 07:11 TaipeiHere

I was also looking for this feature when testing this application.

What is needed is simply a --max_pairs=10 option

In this case it will only accumulate up to 10 pairs in total.

If you specify --dca --price=20 --top=5, I would assume it would spend up to $100 on each pair (if I am not mistaken?)

Another nice feature would be --order-scale and --step-scale options similar to what 3commas offers and this would multiply --price in the case of order-scale and multiply --dist in the case of step-scale.

jay23606 avatar Nov 14 '21 20:11 jay23606