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

Plot Senkouspan A and B

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

    Plot Senkouspan A and B

    Hi,
    i found the IchimokuCloud indicator (attached below) but i need to plot also the Senkouspan A and B . In the original version they are not plotted.

    I have called :
    Add( new Plot( new Pen(Color.Gray, 1), PlotStyle.Line, "SenkouSpanA")); // SenkouSpanA.

    Add( new Plot( new Pen(Color.Black, 1), PlotStyle.Line, "SenkouSpanB"));// SenkouSpanB.

    But they are not plotted .... can someone help me.
    Thanks in advance.
    Luca
    Attached Files

    #2
    Hello sniper,

    I am seeing that you have added the plots, but I am not seeing that you are setting any values on those plots. The plots have nothing to plot.

    The first 3 plots create Values[0], Values[1], and Values[2].

    Your 2 plots create Values[3] and Values[4].
    I am not seeing that Values[3] or Values[4] are being set anywhere in the script.



    Also, there are different versions of the Ichimoku indicator on the NinjaTrader forums.


    You may be able to find one that already has everything you need.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Yes, this looks easy, but is not. If define Values[3] and Values[4] with SenkouSpanA and B the error appear becouse this parameter is olso defined .
      So i define new parameter called SenA and SenB calculate in the same mode of SenkouSpanA and B.
      Now i define Values[3] and Values[4] but the lines are not projectef forward of 26 bars like the Kumo.

      In attached the new script.

      Any idea ?

      Thanks
      Attached Files

      Comment


        #4
        Hello sniper,

        Can you clarify the behavior?

        You have declared SenA to return Values[3] and SenB to return Values[4], you are setting a value to SenA and SenB but no plot is appearing, is this correct?

        (I did not receive a compile error when attempting to compile the attached script)
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I set SenA and SenB, Now they appear but the lines are not projected forward of 26 bars like the Kumo.

          Comment


            #6
            Hi sniper,

            I'm not sure what the Kumo is.

            However, the plots you have added appear to plot on the same bars as all of the other plots.

            Only the cloud appears to be custom rendered as a projection in to the future.

            To project a plot forward, you would need to use displacement.


            This will push all plots in the indicator forward. Then for any plot you do not want projected, only set historical bars and not the current bar.
            If you set Displacement to 2 and you want to set a value that will appear on the current bar on the chart, set the value 2 bars ago.
            Last edited by NinjaTrader_ChelseaB; 10-20-2016, 09:39 AM.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Yes, but i didn't undestand why the indicator plot the Kumo ( the kumo is the cloud on the right) 26 bar in the futures) and the SenA, SenB no.

              Thanks anyway

              Comment


                #8
                Hello sniper,

                The cloud area is not a plot.

                This is custom rendered using unsupported code (graphics.FillPath) in the Plot() override.
                There are special calculations that custom render this using x and y coordinates.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  ok .
                  Thanks a lot !

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by funk10101, Today, 12:02 AM
                  1 response
                  10 views
                  0 likes
                  Last Post NinjaTrader_LuisH  
                  Started by GLFX005, Today, 03:23 AM
                  1 response
                  6 views
                  0 likes
                  Last Post NinjaTrader_Erick  
                  Started by nandhumca, Yesterday, 03:41 PM
                  1 response
                  13 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by The_Sec, Yesterday, 03:37 PM
                  1 response
                  11 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by vecnopus, Today, 06:15 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post vecnopus  
                  Working...
                  X