Dear Mike, Thanks for your reply. I know how that method works, the fact that the size is not checked later is the problem as a real application of the method in live trading. See these two blew trades in the files there are many cases like these: For 1 % fixed fractional, it gives: Trade Symbol Entry Date Signal Price Entry Price Entry Signal Exit Date Signal Price Exit Price Exit Signal Stop Price Direction Quantity Profit/Loss Costs Net Profit/Loss Risk Equity %risk trade 316 BTCUSDT 11/8/2021 2:00 65478.90997 65478.90997 Price Stop 11/9/2021 5:00 66719.46997 68563.99 Price Target 61050.37997 Long 102 314.6782 6.678849 307.9993 1.911462 19933.57 1.569377603 317 BTCUSDT 11/15/2021 1:00 65963.61997 65963.61997 Price Stop 11/15/2021 17:00 63959.46997 63959.46997 Price Stop 63959.46997 Long 582 -1166.415 38.39083 -1204.806 0.3421968 18728.77 -6.044105496 For Trade 317: Quantity * Entry Price = 582* 0.001BTC* 65963.62 = 38,390 $ > current equity= 19,933.57, the order with the size 582 is/will be rejected. Net Profit= 582* 0.001BTC*( 63959.46997- 65963.61997)= -1166.415 $, correct profit as above. Theses orders will not be live traded and the backtest is misleading. Probably it is only working for future margin trading, but surely not for stock or crypto spot trading because the condition is always: Size*entry price <=Equity Best Regards, Arash |
--