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

Draw.Line / Draw.Text very Slow

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

    Draw.Line / Draw.Text very Slow

    Hi,

    My Strategy with about 8000 lines Code needs for 2 weeks back tasting (2 sec chart) about 20 seconds. That's OK.

    But this 20 sec is only true if i disable every Draw.Line / Draw.Text Part.

    If i enable drawing the same strategy needs about 6 min instead of 20 sec.

    This Draw.Line / Draw.Text part is only about 20 lines and normally this part should draw 4 Lines every 1 Minute , that means for 2 weeks back testing about 33000 Lines and about 500 times Draw.Text (just 3 digits)

    Why is this Draw.Part this kind of slow ?

    my PC is very fast, the only older part are the graphic cards :
    two NVIDIA Quadro NVS 450 for 8 Monitors.
    Previous generation Quadro professional GPUs for desktop and Mac workstations. Find specs, datasheets, and more.


    Is the graphic card the reason why this Part is slow ?
    Is there any faster option for Draw.Line / Draw.Text ?
    Last edited by jr123; 01-17-2018, 08:17 AM.

    #2
    Hello jr123,

    Thanks for opening the thread.

    I observe an additional delay when adding drawing objects to the SampleMACrossover strategy. I am looking into this further to find out where the performance delay is coming from and will report back on my findings.

    As a workaround, I may suggest disabling drawing objects while backtesting to keep high performance for backtesting. Although undocumented/unsupported, you could add code to disable drawing objects in a backtest programmatically by detecting the backtest category if you do not want to control the drawing objects with an input parameter.

    More info on detecting backtest categories can be found in the thread here (This is all the information I can provide): https://ninjatrader.com/support/foru...31&postcount=2
    Last edited by NinjaTrader_Jim; 01-17-2018, 08:59 AM.
    JimNinjaTrader Customer Service

    Comment


      #3
      " As a workaround, I may suggest disabling drawing objects while backtesting to keep high performance for backtesting. "

      that's why a add this input parameter (draw yes/no )

      But i need this lines and text in the chart for back testing and optimizing the strategy.
      It's just lines and text for understand what makes the strategy at this times (2 sec chart).
      Without this lines and text is no effective code optimizing possible.

      So for now i have open 2 strategy analyser , one for checking every day separate (with lines ) and one for the full month (without lines) . That works but is a kind of cumbersome.

      Is this Draw.Line / Draw.Text part faster with a better graphic card ?

      Comment


        #4
        Hello jr123,

        While NinjaTrader 8 is hardware accelerated and uses SharpDX for rendering, upgrading the graphics card would likely not resolve an issue with Drawing Tools adding a performance impact to a backtest.

        Asking other members on our QA team, the performance impact would be due to internal thread creation for rendering.

        There would not be much that could be done for NT8, but we could track your interest for a faster rendering system in a feature request.

        If there is anything else I can do to assist, please let me know.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by kempotrader, Today, 08:56 AM
        0 responses
        6 views
        0 likes
        Last Post kempotrader  
        Started by kempotrader, Today, 08:54 AM
        0 responses
        4 views
        0 likes
        Last Post kempotrader  
        Started by mmenigma, Today, 08:54 AM
        0 responses
        2 views
        0 likes
        Last Post mmenigma  
        Started by halgo_boulder, Today, 08:44 AM
        0 responses
        1 view
        0 likes
        Last Post halgo_boulder  
        Started by drewski1980, Today, 08:24 AM
        0 responses
        4 views
        0 likes
        Last Post drewski1980  
        Working...
        X