Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Two problems with T8 script

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

    Two problems with T8 script

    I have an indicator that displays 19 S/R lines on my chart. The lines are basically enhanced Floor Pivots. When I started the strategy in Strategy Builder, the plots for all 19 pivots were recognized and listed. The list was so long, that I unlocked the code and merely copied what code I had, pasted it and changed the description until I had 18 of the 19. When I compile, my error message says the <Y> does not exist. I will upload a screen shot of the compile so you can see exactly. I commented out all of the <Y> entries, compiled and ran the the strategy. When I do, I get an error that the indicators is trying to load added Data. I will upload a screenshot. I added an additional data series and this eliminated the error and I ran t again but I get no results and the result that I am after is 'Print the SandRSignal when price is within the Zone of the line which is user input and I have set at 2 ticks.either side. I thought that possibly I had the incorrect data series active but I tried both. As a comparison, I used Bloodhound and created a Support/Resistance node and it is pulling the data from the original data series and not the added data series. I am including the .cs file and I am sure tha there is a much better way to deal with so many choices but I don't know what it is..:Screenshot of Compile errors:https://www.screencast.com/t/c3IaYt7GNcXf

    I just ran the strategy with the <Y> lines commented out again trying to get the Added data error but this time I didn't get it..

    I would appreciate any help trying to get signals when lines are approached.
    Attached Files

    #2
    Hi, thanks for posting.

    The variables that start with y- will not work because variables can not have a reserved '-' character in them.

    Change Y-High[0] to High[0] for the high price, or search within this custom indicator for the correct name.

    Kind regards,
    -ChrisL
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      The names that I used are exactly as in the Custom indicator.

      Comment


        #4
        Hi, thanks for your reply. It is impossible for a variable to have a '-' in its name, so you will need to find the correct Series name for this using the dot operator. Start typing IT_FTreset1. and once you type the dot, it will populate a list of all properties and objects contained within the custom indicator.

        Kind regards,
        -ChrisL
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Chris,
          World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.

          I am including a short recording of whatI am getng wen I tye the<.>. It is not waht I exected. :

          Comment


            #6
            Hi galsermil, I did not see the y's section of the list. The series you are looking for should be in this list. It also might be an underscore and not a dash symbol. Underscores are allowed in variable names.

            Kind regards,
            -ChrisL
            Chris L.NinjaTrader Customer Service

            Comment


              #7
              Chris,

              In that info, I see a reference to a User Defined High and Low but nothing about 'Y'.. When I comment out the Y's' and the rest of the file compiles, do you see a reason why I cannot get a signal generated by the other lines?

              Comment


                #8
                Hi galsermil, the script has a large if statement with many conditions in it. If you are not getting a signal from that, you will need to use Print to print out each element and see what is true and what is false e.g.
                Code:
                //Print before evaluating:
                Print(Time[0]);
                Print("Close[0] >= (IT_FTreset1.PP[0] - Zone) " + Close[0] >= (IT_FTreset1.PP[0] - Zone));
                Print("(Close[0] >= (IT_FTreset1.R1[0]  + Zone) " + (Close[0] >= (IT_FTreset1.R1[0]  + Zone));
                //... and so on
                // then evaluate the condition.
                if    (((Close[0] >= (IT_FTreset1.PP[0] - Zone))
                                || (Close[0] >= (IT_FTreset1.R1[0]  + Zone))
                                || (Close[0] <= (IT_FTreset1.R1[0]) - Zone))
                Chris L.NinjaTrader Customer Service

                Comment


                  #9
                  Chris,

                  I must need some clarification because I thought you were meaning that I must put the print statemnts ahead of each of the S?R line evaluations but I stated with just the first and got compile errors. It is very possible that my problem was punctuation.

                  Comment


                    #10
                    Chris,

                    I must need some clarification because I thought you were meaning that I must put the print statements ahead of each of the S/R line evaluations but I started with just the first and got compile errors. It is very possible that my problem was punctuation.

                    Comment


                      #11
                      Chris,

                      Since the '.' operator does not give us a specific list, I need to figgure out some way to get the correct names of the 'Y' R/S lines. I am enclosing a picture of the list provided on the Strategy Builder : https://www.screencast.com/t/1vcNLyiR

                      Comment


                        #12
                        Chris,

                        That error message that I told you about yesterday that IT_FTreset was trying to add additional data has returned so I added the data series to the Strategy. Could this have something to do with why I am not getting signals. I am pretty sure that the S/R are calculated with intraday data but that they are plotted only once per day.

                        Comment


                          #13
                          Hi galsermil, those are the names of the Plots, but they are likely named something different in the actual source code. If you have access to the source code for this indicator you can look through the names of the plots in code and use those. If you do not have the source code, you will need to use the Values[][] array or ask the original developer how to access these plots.

                          Please let me know if I can assist any further.
                          Chris L.NinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Touch-Ups, Today, 10:36 AM
                          0 responses
                          5 views
                          0 likes
                          Last Post Touch-Ups  
                          Started by geddyisodin, 04-25-2024, 05:20 AM
                          8 responses
                          61 views
                          0 likes
                          Last Post NinjaTrader_Gaby  
                          Started by jxs_xrj, 01-12-2020, 09:49 AM
                          4 responses
                          3,289 views
                          1 like
                          Last Post jgualdronc  
                          Started by Option Whisperer, Today, 09:55 AM
                          0 responses
                          5 views
                          0 likes
                          Last Post Option Whisperer  
                          Started by halgo_boulder, 04-20-2024, 08:44 AM
                          2 responses
                          24 views
                          0 likes
                          Last Post halgo_boulder  
                          Working...
                          X