Login Page - Create Account

Support Board


Date/Time: Thu, 23 Apr 2026 01:30:57 +0000



Post From: ACSIL BuyEntry always returns -1 when connected to Rithmic/Bulenox in Trade Simulation Mod

[2026-04-22 23:04:13]
maikoroji - Posts: 2
Thank you John for the quick response.

I applied your recommendations:
- Set sc.SendOrdersToTradeService = 0 AFTER the SetDefaults block
- Used "Sim1" as the TradeAccount
- Trade Simulation Mode is ON
- IsFullRecalculation guard is in place

However, I'm still getting issues:

1. With the previous code versions, sc.BuyEntry() was returning -1 on every bar during Chart Replay (Standard Replay and Accurate Trading System Back Test modes). IsFullRecalculation was 0 on those bars.

2. After applying your fix (SendOrdersToTradeService = 0 after SetDefaults + Sim1), the study produces NO log messages at all — not even simple sc.AddMessageToLog calls. The study appears in the study list on the chart but seems to not execute at all during replay.

Questions:

1. What does return code -1 specifically mean for sc.BuyEntry()? The documentation lists SCT_SKIPPED_FULL_RECALC and other named codes, but -1 is not documented. Is it a general rejection?

2. Is there a specific replay mode required for ACSIL automated trading to work? We tried Standard Replay and Accurate Trading System Back Test — neither worked.

3. Does the DLL name matter? We're using SCDLLName("Algo Noah P2") — could having multiple DLLs in the Data folder (we have older AlgoNoah_v7.dll, v8.dll, v9.dll, RetournementDelta_v3-v7.dll) cause conflicts?

4. When using sc.SendOrdersToTradeService = 0 with TradeAccount "Sim1", should we also set sc.TradeAccount in the SetDefaults block, or only in the s_SCNewOrder structure?

5. For a minimal working example of ACSIL automated trading in Trade Simulation Mode during Chart Replay with Rithmic connection — could you point us to a specific example in the ACS_Source folder that is confirmed to work in this configuration?

6. We noticed that after rebuild, sometimes the study seems to not reload properly. Is there a specific sequence we should follow? (Remove study > Rebuild DLL > Re-add study > Start replay?)

Chart: MNQM6.CME 1 Min #3
SC Version: 2899
Connection: Rithmic (Bulenox prop firm)

Thank you for your help.


"Here is the minimal test code we are using. Could you tell us what is wrong with it?


#include "sierrachart.h"

SCDLLName("Algo Noah P2")

SCSFExport scsf_AlgoNoahP2(SCStudyInterfaceRef sc)
{
if (sc.SetDefaults)
{
sc.GraphName = "Algo Noah P2 TEST";
sc.AutoLoop = 1;
sc.AllowMultipleEntriesInSameDirection = 0;
sc.MaximumPositionAllowed = 1;
sc.SupportReversals = 0;
return;
}

sc.SendOrdersToTradeService = 0;

if (sc.IsFullRecalculation)
return;

SCString msg;
msg.Format("ALIVE | Bar:%d", sc.Index);
sc.AddMessageToLog(msg, 0);

int& TestDone = sc.GetPersistentInt(0);
if (TestDone == 1)
return;

s_SCNewOrder NewOrder;
NewOrder.OrderType = SCT_ORDERTYPE_MARKET;
NewOrder.TradeAccount.Format("Sim1");

int Result = sc.BuyEntry(NewOrder);

SCString msg2;
msg2.Format("ORDER | Result:%d", Result);
sc.AddMessageToLog(msg2, 0);

if (Result > 0)
TestDone = 1;
}