Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem with custom indicator

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

    #16
    Originally posted by neo-13 View Post
    Thank's for your answer.
    About your question:
    Did you really intend to write a recursive method at all?
    No, I just want to calculate a sum of slope and his moving average.

    Sorry but If I use your code:
    double MovSlope=EMA(myDataSeries,LenghtMov)[0];
    Print(null);
    Print("CurrentBar: " + CurrentBar);
    Print("CP 1");
    Print("FctMyslope(): " + FctMyslope());
    Print("myDataSeries Value: " + myDataSeries[0]);
    Print("MovSlope: " + MovSlope);
    Slope.Set(FctMyslope());
    Slopemov.Set(MovSlope);

    I have an error.

    Thank's
    What is the error? I have that code running right now, so I cannot help unless you give me the exact text of the error message and when it occurs. Does it happen when you try to compile? When you run it on a chart? When?

    Comment


      #17
      Sorry you have rigth:
      The error come from compil.
      The line is:
      Slope.Set(FctMyslope());
      and the error message is:
      ...slope(idDataseries, int, int) is a method, which is not valid in the given context

      Thank's again for your help

      Comment


        #18
        I found:
        if (CurrentBar == 0)
        {
        myDataSeries.Set(Input[0]);
        Slope.Set(Input[0]);
        Slopemov.Set(Input[0]);

        }
        else
        {
        Slope.Set(FctMyslope());
        double MovSlope=EMA(myDataSeries,LenghtMov)[0];
        Slopemov.Set(MovSlope);
        }
        I must to add "if (CurrentBar == 0)".

        Thank's a lot for your help and time.

        Comment


          #19
          Originally posted by neo-13 View Post
          Sorry you have rigth:
          The error come from compil.
          The line is:
          Slope.Set(FctMyslope());
          and the error message is:
          ...slope(idDataseries, int, int) is a method, which is not valid in the given context

          Thank's again for your help
          All that I did is to simply take your code that you posted in post#3 and add the tracking statements. I do not get any errors, so if you do, then I must conclude that you may have changed your code in the meantime, in which case we are not looking at the same thing anymore. I can only deal with what information that I see, unfortunately.

          Comment


            #20
            Originally posted by NinjaTrader_Joydeep View Post
            Hello edward_bell,
            Thanks for your note.
            Unfortunately there are no native way to do it. However if you set the color of the Plots same as the color of the background then you can make the lines disappear, while the values still appearing in the Y Axis pane.
            Yes that works but if the back color of the chart is black and we set it to be black the value of the plot will be also black and it doesn't look good. And also the plot values when we click the bar will be in black also. Is there other way to customize the plot where in it will not be seen in the chart but the values of the plot will remain as the default color when declaring the plot?

            Comment


              #21
              Originally posted by edward_bell View Post
              Yes that works but if the back color of the chart is black and we set it to be black the value of the plot will be also black and it doesn't look good. And also the plot values when we click the bar will be in black also. Is there other way to customize the plot where in it will not be seen in the chart but the values of the plot will remain as the default color when declaring the plot?
              The color of the Plot will always be the color of the text, so the answer is "no": you set the Plot color, the text color will match it.

              Comment


                #22
                Originally posted by koganam View Post
                The color of the Plot will always be the color of the text, so the answer is "no": you set the Plot color, the text color will match it.
                Thanks for your immediate reply. Basically I want the plot values to be there when you click the bars but the plotted line will be hidden. I tried to set the color to transparent but the plot values will not be show on the bar when I click it. I want the plot will show even if the color of the plot is transparent. I want it to show just like the Close, Low, High, Open price but the plot line will be hidden.

                Comment


                  #23
                  Originally posted by edward_bell View Post
                  Thanks for your immediate reply. Basically I want the plot values to be there when you click the bars but the plotted line will be hidden. I tried to set the color to transparent but the plot values will not be show on the bar when I click it. I want the plot will show even if the color of the plot is transparent. I want it to show just like the Close, Low, High, Open price but the plot line will be hidden.
                  Your description of what you want was already clear. Unfortunately, some things are impossible in an absolute sense, and the way that the NT framework is written seems to dictate that the color of the marker text is defined by the color of the Plot, with no possibility of separation. As the framework is closed-source, that means that we cannot go in there and change that imperative.



                  You have only the 2 choices that have already been identified:
                  1. Make the Plot the same color as the Chart background, thus hiding it, or
                  2. Make the Plot transparent, effectively removing it from display completely.
                  You will have to pick your poison, and accept the side effect that each choice brings.

                  Of course, you can always suggest that what you want should be developed. NT seems to accept almost all suggestions. Whether they will actually provide the ability described is a different kettle of fish.
                  Last edited by koganam; 01-14-2013, 11:08 AM.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by smk200, Today, 10:29 AM
                  1 response
                  12 views
                  0 likes
                  Last Post NinjaTrader_ChrisL  
                  Started by Austiner87, Today, 09:44 AM
                  2 responses
                  21 views
                  0 likes
                  Last Post Austiner87  
                  Started by TriGuy818, Today, 09:19 AM
                  2 responses
                  14 views
                  0 likes
                  Last Post TriGuy818  
                  Started by 7robert, Today, 09:12 AM
                  1 response
                  11 views
                  0 likes
                  Last Post NinjaTrader_Kate  
                  Started by space_trader, Today, 09:11 AM
                  2 responses
                  27 views
                  0 likes
                  Last Post space_trader  
                  Working...
                  X