Login Page - Create Account

Support Board


Date/Time: Mon, 16 Jun 2025 09:17:09 +0000



Post From: Auto Trade Study Compiling But Not Executing or Showing Trade Markers

[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,