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

BarSpeed Multi-TF

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

    BarSpeed Multi-TF

    Hi all, anyone know how to make this simple script that is attached, into a Multi-Data Series. I already added another DataSeries. i'm just wondering if I have to change the "Value" plot? or TimeSpan? how can I do this?
    Attached Files
    Last edited by ginx10k; 12-14-2018, 06:52 AM. Reason: forgot to upload Script

    #2
    Hello ginx10k,

    Thanks for your post.

    Is your goal that you want to have multiple plots to show multiple time frames, or you want the indicator to plot data based on your added data series?

    For the former, you will need to add additional plots to the script and have your secondary data series update temporary variables which will then be assigned to the Values[][] of your new plots on BarsInProgress 0. You will want to update plots on BarsInProgress 0 because plots are synchronized to the primary data series.

    For the latter, the same approach would be taken to assign temporary variables a value and then assign your plots on BarsInProgress 0.

    I've attached an example that can demonstrate plotting information from a secondary data series.

    If you have not done so, I would highly recommend reviewing the Multi Time Frame and Instruments documentation as it provides a complete guide for creating a multi time frame script. Help Guide information is publicly available.

    Multi Time Frame and Instruments - https://ninjatrader.com/support/help...nstruments.htm

    Please let us know if you have any questions.
    Attached Files
    JimNinjaTrader Customer Service

    Comment


      #3
      That just confused me. LoL.

      How can I make this into Multi_TF.
      Code:
            
      
                       TimeSpan timer = Time[0] - Time[1];
      
                      Value.Set(Math.Min(timer.TotalMinutes, MaxBarTime));    //Bar speed is calculated with 'Value', if you can make 'Value' multi-Timeframe Array, the you have Bar Speed
      
         ;
      Please keep it simple if possible.

      Comment


        #4
        Hello ginx10k,

        Value is a series of data points used to display a plot. It sounds like you want to have the plot display a different value altogether rather than adding a plot based on a different time frame with a different study.

        I could not offer further direction for modifying a study, which may be a task better suited for a NinjaScript Consultant. If you would like, I can have a representative of our EcoSystem reach out with more information.

        If you are inquiring on a functionality of NinjaScript without modifying a study, could you clarify further on your goal so I can help further? Pictures can help where possible.

        I look forward to being of further assistance.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by JonesJoker, 04-22-2024, 12:23 PM
        8 responses
        41 views
        0 likes
        Last Post JonesJoker  
        Started by timko, Today, 06:45 AM
        0 responses
        3 views
        0 likes
        Last Post timko
        by timko
         
        Started by Waxavi, 04-19-2024, 02:10 AM
        2 responses
        37 views
        0 likes
        Last Post poeds
        by poeds
         
        Started by chbruno, Yesterday, 04:10 PM
        1 response
        44 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by Max238, Today, 01:28 AM
        1 response
        25 views
        0 likes
        Last Post CactusMan  
        Working...
        X