backtrader icon indicating copy to clipboard operation
backtrader copied to clipboard

fix fractional size not work correctly issue

Open guzuomuse opened this issue 4 years ago • 3 comments

the issue is here https://community.backtrader.com/topic/3260/it-should-be-a-bug-size-with-decimal-not-works-correctly

guzuomuse avatar Dec 16 '20 04:12 guzuomuse

this pull allow you to use fractional size 0.01, 3.833,8.08890 .etc. but you should make sure your size in the scope of float . let say if you set the size=6.464648797997976747192389898,which out of the scope of float. it still have problem. you must make sure you size can express by float or round it before pass the size , size=round(size,8).

guzuomuse avatar Dec 16 '20 08:12 guzuomuse

As stated in the community forum discussion - this change may have a performance degradation issues and thus should be tested appropriately or re-worked. Suggest to take time and search for the alternative solution.

vladisld avatar Dec 16 '20 20:12 vladisld