jon-esperanza / trader-charles

Algorithmic Trading Bot in Python. Charles makes good decisions
https://tradercharles.com/
4 stars 6 forks source link

Maintaining cap amount #2

Open jon-esperanza opened 3 years ago

jon-esperanza commented 3 years ago

When making sure that the cap amount is not exceeded before placing an order, the amount after placing the order is not taken into consideration.

if (amount >= 300): twenty_pct = amount / 20 data['Desired Shares'][x] = round(twenty_pct / df['Close'][x], None) data['Ticker'][x] = df['Ticker'][x] amount = amount - (data['Desired Shares'][x] * df['Close'][x])

jon-esperanza commented 3 years ago

Code drop - fixed in dev Awaiting review from next job batch 06/21/19 @ 6pm