backtrader
backtrader copied to clipboard
fix fractional size not work correctly issue
the issue is here https://community.backtrader.com/topic/3260/it-should-be-a-bug-size-with-decimal-not-works-correctly
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).
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.