Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

2 data t/f on one chart

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

    #16
    Hi, I think you´ve done it the wrong way round... ?

    I want to chart a 2000t chart, and see those candles. And to have an indicator plotting on the 2000t chart, using the date from a minute chart.

    But it´s cool to show that the idea is possible. Very cool. THANKS.

    The indicator is a simple indicator which alerts (with a red or green arrow) when there are specific sized wicks detected. IE: If the preference is set to 15, then it will alert with an arrow whenever a lower or upper wick of 15 ticks or more is closed.

    The plotting of either arrow should trigger the alert.

    Comment


      #17
      ScottieDog, with our example in mind definitely possible to do it the other way round as well. So adding in the minute interval and then charting from your tick chart. The framework available is very flexible.
      BertrandNinjaTrader Customer Service

      Comment


        #18
        OK, I changed the data to Minute Data.

        I also added the second data series to the indicator that I want to use it with. Not sure I have done it correctly, but it compiled without issue.

        I´ve applied it to a chart, and the preferences reflect the changes but it doesn´t seem to be using the 5m data for the data series, even though the preferences says it is ..... Something is not right. Could you look at my code? It´s probably something simple, and I have likely missed everything that is common knowledge.. lol

        Lines I added to the code are 60 (adding the second data series period type), and 130-137 (adding the parameter option in the indicator settings).
        Attached Files
        Last edited by ScottieDog; 06-12-2014, 11:02 AM.

        Comment


          #19
          Hi ScottieDog,

          It does appear you have added the secondary data series correctly.

          However, there is no BarsInProgress check. This means that the code in OnBarUpdate will trigger on both bars.

          If you want the code to only run for the minute series you will need to add:

          If (BarsInProgress != 1)
          return;

          This will prevent the script from running on the primary data series.
          http://www.ninjatrader.com/support/h...inprogress.htm

          Please let me know if this is not what you are looking for.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #20
            so do i replace some code with that line, or do I just dump that line anywhere? sorry for the nooob question. :-)

            Comment


              #21
              Hi ScottieDog,

              That will need to be the first two lines of the action block in OnBarUpdate().
              Chelsea B.NinjaTrader Customer Service

              Comment


                #22
                I think that´s it.. It seems to be working

                Thanks for your help!

                I will update in a few days. Thank-you Thank-you!

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by AgriTrdr, Today, 10:35 AM
                3 responses
                24 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by kenz987, Today, 12:34 PM
                2 responses
                8 views
                0 likes
                Last Post kenz987
                by kenz987
                 
                Started by ChrisR, Yesterday, 12:04 PM
                7 responses
                31 views
                0 likes
                Last Post ChrisR
                by ChrisR
                 
                Started by markpk1, Today, 11:54 AM
                5 responses
                19 views
                0 likes
                Last Post NinjaTrader_Erick  
                Started by sgordet, Today, 07:56 AM
                1 response
                21 views
                0 likes
                Last Post NinjaTrader_Erick  
                Working...
                X