Login Page - Create Account

Support Board


Date/Time: Tue, 03 Jun 2025 06:43:15 +0000



Replay Orders Not Being Sent

View Count: 121

[2025-05-31 04:33:01]
Gradient - Posts: 142
Hi,

I'm conducting a replay using the Calculate At Every Tick Mode.

The processing step is 10seconds.

Chart update interval is 15.

The replay speed is 30.

I've noticed that at the start of the session, when there is a signal, the order is submitted, appears on the chart and the TAL is updated.

However, after the initial order, additional signals are being generated per the Alerts log, but those orders are not accounted for in the TAL and don't appear on the chart during the replay.

I initially conducted the replay using Limit Orders and thought maybe the orders were cancelled after the set elapsed time. I then conducted the replay with Market orders and experienced the same issue.

Why might this be occurring and how can it be resolved?

Thanks
[2025-05-31 06:38:31]
Gradient - Posts: 142
I dropped the processing step down from 10 to 1 sec.

This improved the executions somewhat but there were still signals that were alerted that weren't submitted.

Experimenting with lower replay speeds at this processing step.
[2025-06-02 13:35:41]
John - SC Support - Posts: 40170
You mention alerts. What trading system are you using?

Check your "Trade >> Trade Service Log" to see if there is information on why the orders are not being generated.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2025-06-02 13:54:12]
Gradient - Posts: 142
I'm running the replay using Denali/Teton.

Regarding alerts, whenever an order is generated, my system sends an alert to notify me that an order is being generated.

The Trade Service Log is stating that max positions has been reached as the reason for not sending orders. This is weird as the Max Positions in the Trade Service Log is listed as 1 but the Max Position Size Allowed isn't set in my system. I haven't explicitly set sc.MaximumPositionAllowed.

Also if the Max Positions was 1, that shouldn't prevent the system from trading. It should only prevent a single trade quantity from exceeding this amount. The behavior I'm experiencing is as if after a single trade has been placed, no further trades are allowed.
Date Time Of Last Edit: 2025-06-02 13:55:13
imageMax Position Allowed Error.png / V - Attached On 2025-06-02 13:48:49 UTC - Size: 35.52 KB - 7 views
[2025-06-02 14:01:48]
Gradient - Posts: 142
Update:

I don't understand what is happening with Max Positions Allowed as I'm not setting it.

I do understand why my system isn't trading as a result of that.

My system dynamically determines position sizes.

So its sending an initial order for a 1 lot and attempting later in the replay to send orders with quantities greater than 1.

Because of whatever is happening with the setting of Max Positions Allowed, the orders are being rejected.
[2025-06-02 14:10:16]
Gradient - Posts: 142
I'm using OCO orders, is it possible that the attached orders are somehow being included in the determination of the trade position?
[2025-06-02 15:54:27]
John - SC Support - Posts: 40170
What trading system are you using? Is this a custom study? If one of the built-in studies then which one? A Spreadsheet Study? or something else?

Check the setting for "Global Settings >> Symbol >> Use Global Trade Position Limit". If this is enabled and set to 1, then this could be the issue. Refer to the following:
Global Symbol Settings: Use Global Trade Position Limit (Global Settings >> Symbol Settings)
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2025-06-02 16:23:39]
Gradient - Posts: 142
I running a custom system that I built using ACSIL.

There is no value for the Use Global Trade Position Limit and it is unchecked.
[2025-06-02 16:41:50]
John - SC Support - Posts: 40170
You need to look into your code and see what is occurring with this. Everything you state points to having the variable sc.MaximumPositionAllowed set to a value of 1.

Refer to the following for how this variable works:
Automated Trading Management: MaximumPositionAllowed
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2025-06-02 16:43:53]
Gradient - Posts: 142
Ok.

I'm aware of that variable. I've used it in the past but its never been set to 1.

I checked my code earlier, both Dev and Prod, searching for the variable and it was not set.

I'll recheck the code.
[2025-06-02 17:17:22]
Gradient - Posts: 142
I double checked, searched for MaximumPositionsAllowed, and this setting not there.
[2025-06-02 17:21:39]
Gradient - Posts: 142
I also noticed that the Chart Stats in the TAL displays the PnL over the period, but the Statistics, Trade Activity, etc tabs are all empty
[2025-06-02 19:05:02]
Gradient - Posts: 142
I added the sc.MaximumPositionsAllowed to the study and that appears to have corrected the issue.

However, I did notice that while the system should only trade under certain conditions (i.e. sc.Subgraph[N][sc.Index]==1) and the displayed condition is not true, orders are still being transmitted as if those conditions are being ignored.

The logic is simple:

Pseudo Example:

int longTrade=0;
int shortTrade=0;

if(sc.BidVolume > 2*sc.AskVolume){

shortTrade=1;

}

if(sc.AskVolume > 2*sc.BidVolme){

longTrade=1;

}

sc.Subgraph[13][sc.Index]=longTrade;

if(sc.Subgraph[13][sc.Index]==1){

longTrade=1;

}

I'm noticing per the subgraph output that the conditions haven't been met to generate an order but orders are being generated.

Is this likely a result of the preprocessing step or playback speed?
[2025-06-02 19:31:55]
Gradient - Posts: 142
The second issue has been resolved.

I needed to nest logic inside of a parentheses.

For example:

orignal

if( (X ) || (Y) || ( Z) && A){

//do something

}


solution:

if( ( (X) ||( Y) || ( Z)) && A ){

//do something
}


Thanks
Date Time Of Last Edit: 2025-06-02 19:33:05

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account