alpacahq / Momentum-Trading-Example

An example algorithm for a momentum-based day trading strategy.
642 stars 218 forks source link

Nothing in my account. #27

Closed dc500 closed 4 years ago

dc500 commented 4 years ago

I used the Momentum-Trading-Example to test out the API. I'm watching everything play out. I see where I am buying and selling (in the terminal), but nothing is posting to my account. Did I miss something?

Yeah something is not right. I dropped my Equity to $25k which gave me $100k in buying power. When the script starts it says I have Initial total buying power = 361722.36.

dc500 commented 4 years ago

Fixed it.

noahdemoes commented 4 years ago

How were you able to fix it? I am experiencing the same issue.

dc500 commented 4 years ago

How were you able to fix it? I am experiencing the same issue.

I got it "working" about a hour ago. It was connecting to the server, but the code was screwed up.

Describe exactly what's happening for you?

If the code is working properly you will see data being returned in your terminal window. I set mine to run during the premarket. I should know within a hour if it's actually working (buying) or not. Yesterday, it tried to buy on my LIVE but I got hit with a PTD warning (I didn't liq RH yet lol).

To make things easier for you, I'll upload what I have. Give me about 2 mins. It will be saved as AP1.

dc500 commented 4 years ago

How were you able to fix it? I am experiencing the same issue.

Sorry I took longer than 2 mins. I've uploaded it for you. It's saved as AP1. - https://github.com/dc500/AP1

noahdemoes commented 4 years ago

Thank you for posting that code. So my output when I run python algo.py is the following:

Getting current ticker data... Success. Tracking 151 symbols. Getting historical data... 1/151 2/151 3/151 4/151 5/151 ... 150/151 151/151 Success. Watching 151 symbols.

There is nothing that occurs afterward, so there is no buying or selling.

zenwaffles commented 3 years ago

@noahdemoes I'm having this exact same problem. Did you ever figure out why it does this or fix it?

nickvertucci commented 3 years ago

@noahdemoes @dc500 were you guys able to get it working? I have the same exact issue and not seeing any results. Hopefully someone is still monitoring this repoo and we can all fix it for everyone.