mkajnar / DailyBuyStrategy

GNU General Public License v3.0
26 stars 17 forks source link

The strategy needs improve #2

Closed jifengthu closed 8 months ago

jifengthu commented 8 months ago

Strategy is very good, but it is easy to hold orders all the time, so the first will bring the problem of the use of funds, that is, there is no additional funds to the real need of the species; the second is that the longer the strategy to open positions, often the greater the loss, so you can see that the strategy loss of the order directly brought a lot of drawdown

mkajnar commented 8 months ago

This was because I tried to hold profit at all costs using Confirm Trade Exit, but I don't do that anymore, I wait for fees at most. Today I redesigned the buying as well and thanks to a colleague we have a feature to buy up positions so that on a weak move up in a loss we can sell at a profit. I will save the version. What I would need help with from you if you can is to set more precise buys in the lowest positions, so that no more than a maximum of 70% of the top is bought. Do you have any ideas on indicators that might help. I have combined Ema8 and Ema14 to cross and track their percentage differences. But it still has some noise.

mkajnar commented 8 months ago

The strategy has a false config on the number of open positions so that it can buy for less and make the calculations work. Directly in the strategy there is a variable out_open_trades_limit = 4, which sets the maximum number of open trades for which splitting will keep the right amount of funds even for DCA.

Example: i have $500, but i will open a maximum of 4 positions of $10 each, so i will allow "like" 50 positions in the config. Since 4 will be bought and no more will be allowed to open, when prices fall, the DCA will be calculated from the rest of the 500 - 40 i.e. $460 and each position will have up to $115 available for DCA.

mkajnar commented 8 months ago

Try this - it is flattened and working better than HPStrategy* childs . Of course it is hyperoptable... https://raw.githubusercontent.com/mkajnar/HighProfitStrategy/main/user_data/strategies/HPStrategyTFJPAConfirmV1.py