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

one indicator and multi time frames

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

    one indicator and multi time frames

    Hi,

    I want to do below but i can't because i don't know start point and don't have a plan. Please show me the right path.

    1.I'll write one indicator, normally it take price.close input series and it produce one output type of DataSeries. Output Dataseries contain swing highs and lows.
    2.I want to apply this indicator to many time frames. Supoose 220, 440, 660 thick series. So eventually i have many swing outputs too.
    3.Then i want to produce one dataseries these swing output dataseries. Suppose i eliminate or combine some swings for find support and resistance lines.

    Thanks.
    Attached Files

    #2
    Hello aytacasan,

    First thing to understand is that swing is a repainting indicator. This means it looks at future values to determine swing points. This makes it challenging adapting these values for other indicators or strategies.

    You can view the source code by clicking tools > Edit NinjaScript > indicator > Double click swing.

    Search our forums for other approaches people have offered for working with this indicator:


    See here for documentation on MultiTime frame NinjaScript.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hi, Thanks for your response. But respons not related my request. I have own indicator for swing (it is not repaint i mean it don't plot any swing point if not certanity) and i don't ask how can i write this indicator or how can use ninja's swing indicator. I want to learn how you write indicator or indicators for my firt post's scenerio.

      Thanks.

      Comment


        #4
        If you're looking for help with multiseries indicators, please see the sample built in. Tools > Edit NinjaScript > Strategy > Sample multi time frame as well as the documentation link included in my first reply.

        Please clarify your first request if you're looking for something else.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Hello,

          I know how can i write multiseries indicators. I want to write complex indicator that will find swing high and lows many time frames then will combine swing high and lows one collection then will reduce swings with select effective swings. I don't know how can i success these in Ninja. If you still asking what is your request from us? I hope only advice that compotible with Ninja infrastructure. Like this:

          You can follow this steps:
          1.Write indicator MySwings that calculate swings. But don't add any plot write this indicator for only calculate purpose.
          2.Write indicator MyMTFSwings indicator that uses swings indicator for purpose of combine swings.
          3. Write indicator MySupportResistance indicator that uses MyMTFSwings indicator. This indicator reduce swings and plot remaining swings via Line object.

          Of course above steps is not effective and realistic only fake. You don't understand me clearly because my english is not enough for tell you my problem. Sory about that.

          Why i need this indicator: Before trade all traders open charts in order daily, hourly etc. and work to find real support & resistance. I don't want to do this often. I want to ninja do this job for me.

          Best Regards.
          Last edited by aytacasan; 11-18-2010, 05:42 AM.

          Comment


            #6
            aytacasan, you can create such an indicator by more or less following your steps, indicators don't have to plot anything, you can also add series in the background and do MultiSeries calculations this way - however for we do not custom program for customers nor debug and as such we could not lay out a programming blueprint for you to realize your indicator.

            Should you seek to get it created for you professionally, please contact a certified NinjaScript consultant who could assist then -



            You can also look into the Fib confluence tool shared by a fellow user, perhaps it will give you a starting point for your own work into this area - http://www.ninjatrader.com/support/f...fluence&desc=1
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Hello,

              I guess I can not express my problem exactly. I don't need assist any NinjaScript consultant. Already I'm proffessional programmer. I learned almoust all features about indicator thanks to you. I mean if Ninja infrastructor allowed this type indicator, i can write easily. So my question is Ninja infrastructor allowed me to develop this type indicator.

              Whatever, when i see your post i decide to begin to debelop this indicator. Because if i encounter problem, I can ask concrete questions. Yes now i have this type question

              Shortly i develop SwingSeries indicator, this indicator have one DataSeries and don't have any plot, like your CustomDataSeries example. This indicator DataSeries name is Swings. Indicator set plot if really catch swing. So it set swing plot n bars later, like this:

              if (Close[0] > swingLowTrigger)
              {
              Swings.Set(CurrentBar - lastLowestBar, Low[CurrentBar - lastLowestBar]);
              }

              Then I write other indicator suppose its name is UseSwingSeries and it have one plot name is SwingsPlot.And I write below code its OnBarUpdate:

              SwingsPlot.Set(0, SwingSeries().Swings[0]);

              And normally indicator work wrong. Because UseSwingSeries unaware of when SwingSeries set its Data series. So to say my UseSwingSeries plots past

              How can i inform UseSwingSeries plot is changed from SwingSeries indicator. For example DataSeries have any event for this? Maybe i can delegate it. What is the Ninja solution this type problems?

              Best Regards.

              Comment


                #8
                Is your custom DataSeries properly exposed so it becomes accessible at all?



                Per default only plots would have this option, but with the sample above you can expose custom series or variables.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Hello,

                  I think there is a minunderstanding. I decide to write simple sample for what what i mean. Please see attachments.

                  Sample series have DataSeries for dummy calculation. For test you can change data series via Plot you'll see indicator put dots 0, 3, 6, 9, .... bars close value. So SampleSeries works good. when I use it from SampleIndicator, I want to see same bars(0, 3, 6, 9, ....) close values ploted via dots too. But I don't.

                  Thanks.
                  Attached Files
                  Last edited by aytacasan; 11-24-2010, 01:07 PM.

                  Comment


                    #10
                    Hello,

                    I;m not able to run your uploaded strategy there is an error with it.

                    Failed to Call Method:ObjectReference not set to an instance of an object.

                    This most likely means this the below:



                    Please add this in and then also make sure the bars back setting is set correctly. Either at 256 on both or Infinit on both.

                    I look forward to assisting you further.

                    Comment


                      #11
                      Hello,

                      Strategy? What strategy? I don't upload any strategy and i don't talking about any strategy. Please copy two files on indicators directory.

                      Thanks.

                      Comment


                        #12
                        aytacasan,

                        Guess I am not following you by your 0, 3, 6, 9 counting. Both your scripts load and run on my end. What exactly do you find is wrong?
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #13
                          Hello,

                          Step by step guide:

                          STEP 1.Open SampleSeries and add one dot type plot and set its value same as MySeries and add indicator to chart. This way firstly you see what I want to do? You'll see 0,3,6,9,12,15,18,21 (X % 3 == 0) bars(series) have close value of the bar(price). Remove plot from chart and delete all code you added to indicator(reset).

                          STEP 2.Add to chart my SampleIndicator and see that is this a same plots on chart same as Step 1. Of couse Not, you'll see. whereas, must be same plots STEP1 and STEP2. WHY NOT? AND HOW CAN I FIX IT?

                          PS:I don't say this indicators not compling or not working.

                          THANKS.

                          Comment


                            #14
                            Unfortunately we are not following you with your 0,3,6,9 count. What exactly are you trying to see and what exactly do you feel you are not seeing. What I see is every single bar has a value set by SampleSeries. Please just upload a screenshot of what exactly you want to see and what exactly you feel you are not seeing. Thank you.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #15
                              Hi,

                              I sended screenshot. You consantrate wrong things. But i hope i am wrong. See it and please tell me your idea.

                              Thanks.
                              Attached Files

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Kaledus, Today, 01:29 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post Kaledus
                              by Kaledus
                               
                              Started by PaulMohn, Today, 12:36 PM
                              1 response
                              16 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by yertle, Yesterday, 08:38 AM
                              8 responses
                              36 views
                              0 likes
                              Last Post ryjoga
                              by ryjoga
                               
                              Started by rdtdale, Today, 01:02 PM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_LuisH  
                              Started by alifarahani, Today, 09:40 AM
                              3 responses
                              18 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Working...
                              X