-
hey @kernc , is there any way to add a new column(commission) in want to verify if the commissions are being calculated correctly... by the way till now i thought that commission parameter was in percentage and while reading documentation i found out i was wrong... Learned the lesson the HARD way, to always read the documentations first ... moreover i cant even explain how much have you helped me with your awesome library. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You can compare the trade EntryPrice with its respective bar's Open price. See what you can do with the following piece of code: trades = stats['_trades'].set_index('EntryTime')
prices = data.Open[trades.index]
commissions = (prices - trades.EntryPrice) * -np.sign(trades.Size) / prices E.g.
|
Beta Was this translation helpful? Give feedback.
-
Would the correct way to calculate the total spent on commissions be the following:
Basically the difference in price times the size of the order? |
Beta Was this translation helpful? Give feedback.
You can compare the trade EntryPrice with its respective bar's Open price.
See what you can do with the following piece of code:
E.g.
commissions
with Quick Start example: