Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Parallelization not Possible?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Parallelization not Possible?

    I am afraid I already know the answer, but it was be really super if it was allowed.

    Are parallelized loops possible in NinjaScript? Specifically, parallel for loops (System.Threading.Tasks.Parallel.For)? I am unable to compile 'using System.Threading.Tasks' in my declarations.

    I am guessing that this capability "is not supported." But, it seems that invocation to System.Threading.Tasks is disabled in NT. Looking at my strategy in Visual Studio, Parallel.For is completed in IntelliSense, whereas it is not in NT. This suggests that somehow NT is disallowing System.Threading.Tasks. Can you give me a good reason why?

    Has anyone figured out how to do this?

    Thanks!

    #2
    Serac,

    This is unsupported, however you may find more information elsewhere most likely. I remember finding a way to do this once before using a Google search. You just need to look up ".NET 3.5 parallel for loop" or something to that effect.

    Such as :



    While talking to a coworker about optimizing some heavy-hit, relatively resource intensive code the topic of multi-threaded programming came up.


    Parallel Task Library when released with .NET 4.0 will be great, until then here is a simple .NET 3.0 Parallel.ForEach for the rest of us.


    .NET 4 is what introduced a better parallelization library, however currently NinjaTrader uses .NET 3.5.
    Last edited by NinjaTrader_AdamP; 08-21-2012, 08:50 AM.
    Adam P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Segwin, 05-07-2018, 02:15 PM
    10 responses
    1,769 views
    0 likes
    Last Post Leafcutter  
    Started by Rapine Heihei, 04-23-2024, 07:51 PM
    2 responses
    30 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by Shansen, 08-30-2019, 10:18 PM
    24 responses
    943 views
    0 likes
    Last Post spwizard  
    Started by Max238, Today, 01:28 AM
    0 responses
    10 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by rocketman7, Today, 01:00 AM
    0 responses
    7 views
    0 likes
    Last Post rocketman7  
    Working...
    X