Closed tmcquaig closed 4 years ago
If you look at the pull request I put in you can see I was having the same issue. I came up with a work around for it that I posted there but I don't think he has reviewed it yet.
If you look at the pull request I put in you can see I was having the same issue. I came up with a work around for it that I posted there but I don't think he has reviewed it yet.
I have tested this and it works. The for loop correctly advances through all of the positions.
Thank you!
Your welcome I'm happy it worked for you too.
Fix has been integrated, closing this issue.
PLEASE DEAR ALEX HOW CAN I WRITE THE CODE SOO THE BOT CAN PLACE A BUY AND SELL TRADE AT THE SAME TIME WITH A 4 PIPS STOP LOSS IN PYTHON TNX UU IN ADVANCE
HEY ALEX I REALLY LOVED WATCHING YOUR VIDEOS ON YOUTUBE THEY ARE VERY EDUCATIVE BUT I HAVE A QUESTION FOR U HOW CAN REPROGRAMMED MY BOT TO EXIT A TRADE ONCE PRICE REACH 4 PIPS STOP LOSS I REALLY APPRECIATE THE HELP
Bot connected etc first print gives me specified account information. Second print gives me 20 entries for the same equity instead of the 20 different equity positions in the account.
Code:
OUTPUT: [{'account_number': '123', 'account_type': 'MARGIN', 'available_funds': 11.31, 'buying_power': 122.62, 'cash_available_for_trading': 0.0, 'cash_available_for_withdrawl': 0.0, 'cash_balance': 0.0, 'day_trading_buying_power': 0.0, 'long_market_value': 113.05, 'maintenance_call': 0.0, 'maintenance_requirement': 365.92, 'short_balance': 0.0, 'short_margin_value': 0.0, 'short_market_value': 0.0}] [{'account_number': '123', 'asset_type': 'EQUITY', 'average_price': 125.51974, 'current_day_profit_loss': 54.723030000001, 'current_day_profit_loss_percentage': 0.57, 'cusip': '123', 'description': '', 'long_quantity': 43.089, 'market_value': 91.16, 'settled_long_quantity': 43.089, 'settled_short_quantity': 0.0, 'short_quantity': 0.0, 'sub_asset_type': '', 'symbol': 'VUG', 'type': ''}, {'account_number': '123',
It continues but I cut it there.