ERROR :error receiving packet - socket closed abnormally

Good day guys, I'm receiving an error about packets. And also I see 'No positions found' and 'No trades' from my dashboard and trades respectively. How do I use ALPACA with Blueshift?

Hi Martin, the Blueshift console will show you all errors encountered during the course of the strategy run. Blueshift can recover from some of them, and in those cases, it will continue to run. If Blueshift encounters an error it cannot recover from, it will exit. If your strategy has not exited after showing some error, it means Blueshift was able to recover from the error. The "error about the packets" appears to be a recoverable error about some temporary connection drop. Also, You may see "no positions found" and "no trades found" in the dashboard, if your strategy is yet to execute any trades. That can happen if you are running the strategy during non-market hours or the strategy signal conditions is not met yet. Feel free to reach out to us here or at the blueshift-support mailbox if you have more questions or need help.

Thank you for your response. My strategy on Blueshift is running, but not executing any trades. On my ALPACA paper account, a have:



Equity

$100,002.45

 Buying Power

$199,605.89

Cash

$99,603.44



Portfolio:

SPY

Price:$398.98  Quantity:1  Market Value:$398.98  Profit:+$2.42





Then on BlueShift, I have a capital of $100,000.





I'm now confused.

If the strategy is running and not placing trades during the trading hours (NYSE trading hours), then you need to check 1) if your strategy logic is generating a trade signal at all and 2) if you have specified enough capital in case you are using portfolio fraction based ordering functions (e.g. order_target_percent or order_percent). You need to check your strategy carefully if your problem is not one of the above. If you need help, please send a mail to blueshift-support with a version of your strategy attached so that we can reproduce the observation.



The equity capital reported on your brokers dashboard (in this case Alpaca) and the one you see on the Blueshift dashboard are NOT the same thing. Blueshift reports the equity capital associated with your running strategy only. If you have started the strategy with initial capital of $100,000 and it has not traded anything, its capital should remain $100,000. If it trades, it may change based on the profit and loss on the trades done by ONLY the strategy (and not any trades done by other means, e.g. you trading manually directly on the broker platform). If you send a screenshot of the blueshift dashboard that captures the trades page as well as the dashboard page (including the positions) to blueshift-support mailbox, we can confirm if there is any mismatch.