Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
OnMarketData performance
Collapse
X
-
Hello guillembm,
Your logic would need to control this within the script.
It would be possible to create a bool in the script that is true when any orders are alive and set to false once all orders are State.Filled or State.Cancelled.
Or you could create an array that holds the order objects and check that all open orders are not filled or cancelled.
Many of the example scripts I have check for this.
Leave a comment:
-
Yes, the order is correctly set to null. I was just wondering for a better option.
Thanks
Leave a comment:
-
Originally posted by guillembm View PostThanks Ray.
This is the option I am trying. This will avoid proccessing code when no orders are working.
Sort of:
if (MyOrder = null)
return;
But, this will still keep on loading data in the method.
I was wondering if there is a way to stop loading data.
Leave a comment:
-
Thanks Ray.
This is the option I am trying. This will avoid proccessing code when no orders are working.
Sort of:
if (MyOrder = null)
return;
But, this will still keep on loading data in the method.
I was wondering if there is a way to stop loading data.
Leave a comment:
-
Originally posted by guillembm View PostI am trying to improve strategy performance and I am detecting that OnMarketData is using loads of CPU.
I only need OnMarketData to load data while an order is working. Would it be possible to stop OnMarketData loading data when no orders are working in the strategy?
Is there any other option to reduce OnMarketData CPU usage?
Leave a comment:
-
OnMarketData performance
I am trying to improve strategy performance and I am detecting that OnMarketData is using loads of CPU.
I only need OnMarketData to load data while an order is working. Would it be possible to stop OnMarketData loading data when no orders are working in the strategy?
Is there any other option to reduce OnMarketData CPU usage?
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by adeelshahzad, Today, 03:54 AM
|
4 responses
25 views
0 likes
|
Last Post
by adeelshahzad
Today, 10:51 AM
|
||
Started by merzo, 06-25-2023, 02:19 AM
|
10 responses
823 views
1 like
|
Last Post Today, 10:38 AM | ||
Started by frankthearm, Today, 09:08 AM
|
5 responses
17 views
0 likes
|
Last Post Today, 10:19 AM | ||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
43 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
||
Started by yertle, Today, 08:38 AM
|
5 responses
16 views
0 likes
|
Last Post Today, 09:45 AM |
Leave a comment: