Support Board
Date/Time: Mon, 16 Jun 2025 01:05:20 +0000
[Programming Help] - Auto Trade Study Compiling But Not Executing or Showing Trade Markers
View Count: 237
[2025-05-15 16:31:45] |
User867930 - Posts: 8 |
Support, I'm developing an auto trade study in VectorAI.cpp. The file compiles successfully using the Build Custom Studies tool. All global and chart-specific Auto Trading settings are properly enabled (Auto Trading Enabled - Global and Auto Trading Enabled - Chart are both checked), and Trade Simulation Mode is on. The strategy is attached to a chart with live or replay data (tested both), and I've added diagnostic print messages which confirm the logic is being processed correctly — including proper values from conditions and study subgraphs. However, no trades are being executed, and no trade markers are showing on the chart. The Trade >> Trade Service Log is flooding with messages like: vbnet CopyEdit Buy Entry Failed: General order error. Refer to 'Trade >> Trade Service Log' for specific message for this trading action error. We tried printing sc.GetTradingErrorTextMessage(Result) for additional context, but didn't get a specific reason beyond "general order error." Settings we've already verified: • Sim account is active and not locked • No Global Profit/Loss Management restrictions are triggered • Orders are being placed using sc.BuyEntry(order) and sc.SellExit(exit) with properly defined SCNewOrder objects • Trade Position and order quantities are positive and valid Could you help identify why trades are being rejected and what might cause the generic order error when all conditions and study logic appear to be functioning correctly? Thank you so much for your Support, |
[2025-05-15 16:39:18] |
User431178 - Posts: 712 |
Did the code I edited in your other post not work for you? Custom Study Compiles but Not Recognized or Executed in Chart Replay Mode |
[2025-05-15 16:54:57] |
User867930 - Posts: 8 |
I solved the particular issue I had with the data types but I could never open your file. It was corrupt or had some issue but since I solved the problem I was having at the time, I didn't want to bother you with the file. If you would be so kind as to resend that particular file it would be greatly appreciated. I noticed that your main office is in Sheridan, Wyoming. I played you in football and graduated from Pinedale H.S. in Pinedale, WY. Have a great day and a stellar summer, Paul |
To post a message in this thread, you need to log in with your Sierra Chart account: