Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 15:11:54 +0000



[Programming Help] - How to automatically aggregate positions from 2 different studies?

View Count: 223

[2024-05-16 11:46:55]
User895922 - Posts: 1
The problem i am facing is like this. I have 2 studies which are different strategies meant to be run together. Both of them will have their own trades. Now take the case where study 1 executed 10 lots long at market. Now if maybe 5 minutes later, study 2 executes 5 short orders at market, What is happening is the earlier 10 lots are getting flattened and my net position becomes 5 short. This wasnt the intended effect. Ideally what i want to happen is, if study 1 is long 10 lots and study 2 executes 5 short orders, my net position should now be 5 long. as 5 lots were liquidated. In this scenario if the market goes to my study 1 stop loss, it should result in 10 lots shorted (which were earlier long), so my net position becomes 5 short. However i am not able to achieve this. I dont require 2 positions from different strategies to run simultaneously although the net effect would be the same. I just want my orders changing in this fashion. How can i achieve this?
[2024-05-16 15:21:22]
John - SC Support - Posts: 36238
We can not answer this, as it is something in your setup that is doing this. It is not a Sierra Chart specific thing.

There is no specific setting in Sierra Chart that causes the situation you are referring to. This is something specific to your trading setup.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-05-17 18:47:41]
ForgivingComputers.com - Posts: 960
Assuming you are using custom studies, you can control that behavior with these settings:

sc.SupportReversals = false;
sc.CancelAllOrdersOnEntries = false;
sc.CancelAllOrdersOnEntriesAndReversals = false;
sc.CancelAllOrdersOnReversals = false;


These settings may also be in whatever trading study you are using.
Date Time Of Last Edit: 2024-05-17 18:54:09
[2024-05-19 16:20:35]
OctoPi - Posts: 37
We built a framework that accounts for this. It uses logic that allows only trades that don't conflict (long with a long) to enter at the same time. It keeps track of entries per strategy and allows each strategy to either stick with original order parameters or be modified by "signals" that are same/similar to entry signals.
We sell the system. Do contact if you prefer to do less coding.

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

Login

Login Page - Create Account