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

Looking for a tutorial on how to manipulate indicators to create a new indicator

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

    #16
    Quick question. I uninstalled my ninja when I was looking to fix that problem with the error above. I also deleted the files in program files, and copied the ninja folder in "my documents." I did not create a backup before doing this.

    Can I restore my tic data with the ninja folder I saved off from the "my documents" folder? Is there a folder in there that contains that data? I don't think ninja supports that in a way like some other platforms correct?

    Comment


      #17
      Looking for an explanation on List Variables, there doesn't seem to be anything in the ninja documentation?

      Comment


        #18
        Arrays and Lists would be more general C# and therefore outside of the scope we can support here, but MSDN / Google would offer lots of input on those.

        For the folder you saved, look under NinjaTrader7 > DB > this would contain your stored historical data (tick, min, day).
        BertrandNinjaTrader Customer Service

        Comment


          #19
          Originally posted by NinjaTrader_Bertrand View Post

          For the folder you saved, look under NinjaTrader7 > DB > this would contain your stored historical data (tick, min, day).
          Can I just copy the "db" folder over?

          Comment


            #20
            Yes, that should work, close NT7 before doing this step.
            BertrandNinjaTrader Customer Service

            Comment


              #21
              How would I go about creating a data series within one indicator that I could reference from another indicator.

              Say I have an indicator that calculates the value of something, and I then want to put that into a series.... so that from another indicator I can reference these values.

              Comment


                #22
                You would need to store values in a custom series and then expose this series for external access (plots would be exposed per default, but not regular dataseries objects) - here's how it works:

                BertrandNinjaTrader Customer Service

                Comment


                  #23
                  Originally posted by NinjaTrader_Bertrand View Post
                  You would need to store values in a custom series and then expose this series for external access (plots would be exposed per default, but not regular dataseries objects) - here's how it works:

                  http://www.ninjatrader.com/support/f...ead.php?t=4991
                  I am a bit confused. I installed the "SampleBoolSeries" file, and attempted to get access to the BoolSeries created in the file, "SampleBoolSeries."

                  I created a random study, to print the value of the dataseries(bullIndication) that is created in the sample file as I thought the purpose was to have the information in that DataSeries available to any study?

                  I tried to get access to that file with:
                  Code:
                  Print(SampleBoolSeries().bullIndication[0]);
                  And then I get the following error in the picture.
                  Attached Files

                  Comment


                    #24
                    Yes, this will not work, you would need to access the public property, so the capitalized Bull / Bear indication.
                    BertrandNinjaTrader Customer Service

                    Comment


                      #25
                      Ok that worked, thank you sir!

                      Comment


                        #26
                        I've gotten most everything I need and my script is working close to the way I want, but now I'm having a "DrawText" Problem.


                        Here are some arrows I painted on the chart, along with some text I wanted to print under these particular arrows. You can see it will only print on one arrow and not ALL of them. I have the DrawText in the same location of my code as the arrows.

                        I thought it was because they both had the same tag, but I paused one of them, and still got the same issue.

                        How would I get this to print the text for each one?

                        Here is the code snipet in case the pic is unclear:
                        Code:
                        			//1a_a Trade
                        			if(ERG_Trade().Ltsx[0] == 1 && ERG_Str1().HISTSlope[0] == 1 && ERG_Trade().HIST[0] >= 10 )
                        			{
                        				if(ERG_Trade().HISTSlope[1] == 1 && ERG_Trade().HISTSlope[2] == 1 && ERG_Trade().HISTSlope[3] == -1)
                        				{	
                        				DrawArrowUp("arrow"+CurrentBar.ToString(), true, Time[0], Low[0]-12*TickSize, Color.Green);
                        				DrawText("text"+CurrentBar.ToString(), Open.ToString(), 0, Low[0]-30*TickSize, Color.Black);
                        				DrawText("text","1a_a", 0, Low[0]-38*TickSize, Color.Black);
                        							
                        				}
                        			}
                        Attached Files

                        Comment


                          #27
                          Originally posted by forrestang View Post
                          I've gotten most everything I need and my script is working close to the way I want, but now I'm having a "DrawText" Problem.......
                          I got it working.

                          Comment


                            #28
                            I have another question. I've generating a bunch of entry arrows/signals. The plan is to eventually get this into a strategy.

                            How would I go about generating the opposing sell signal for each of my entries based on some criteria I have? Is there a functionality in ninja that makes this easy to do?

                            Here is an example of the code I use to generate one of the signals.
                            Attached Files

                            Comment


                              #29
                              PPF's are a wonderful thing - sorry I'm not sure I follow exactly what you look for - wouldn't your sell signal then be tied to a custom condition programmed into the script as well?

                              Generally you can tag entry & exitsignal together via the EntrySignal / FromEntrySignal paramters provided in the Entry() methods.
                              BertrandNinjaTrader Customer Service

                              Comment


                                #30
                                Originally posted by NinjaTrader_Bertrand View Post
                                PPF's are a wonderful thing - sorry I'm not sure I follow exactly what you look for - wouldn't your sell signal then be tied to a custom condition programmed into the script as well?

                                Generally you can tag entry & exitsignal together via the EntrySignal / FromEntrySignal paramters provided in the Entry() methods.
                                Well, say for example I already have ALL the entry signals coded, which I do. So each time a possible trade shows up, it plots the corresponding arrow at the proper time. So all my entry signals are right where I want them.


                                Looks like I forgot to attach ONE OF the code snippet used to generate an entry:
                                Code:
                                //1a_A Trade
                                			
                                			if(ERG_Trade().Ltsx[0] == 1 && ERG_Str1().HISTSlope[0] == 1 && ERG_Trade().HIST[0] >= 10 )
                                			{
                                				if(ERG_Trade().HISTSlope[1] == 1 && ERG_Trade().HISTSlope[2] == 1 && ERG_Trade().HISTSlope[3] == -1)
                                				{	
                                				DrawArrowUp("arrow"+CurrentBar, true, 0, Low[0]-12*TickSize, Color.Green);
                                				DrawText("text0"+CurrentBar, ""+Open.ToString(), 0, Low[0]-30*TickSize, Color.Black);
                                				DrawText("text1"+CurrentBar ,"1a_A", 0, Low[0]-38*TickSize, Color.Black);
                                				inTrade = true;			
                                				}
                                				
                                			}

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by algospoke, 04-17-2024, 06:40 PM
                                6 responses
                                49 views
                                0 likes
                                Last Post algospoke  
                                Started by arvidvanstaey, Today, 02:19 PM
                                4 responses
                                11 views
                                0 likes
                                Last Post arvidvanstaey  
                                Started by samish18, 04-17-2024, 08:57 AM
                                16 responses
                                61 views
                                0 likes
                                Last Post samish18  
                                Started by jordanq2, Today, 03:10 PM
                                2 responses
                                9 views
                                0 likes
                                Last Post jordanq2  
                                Started by traderqz, Today, 12:06 AM
                                10 responses
                                21 views
                                0 likes
                                Last Post traderqz  
                                Working...
                                X