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 help on Indicator

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

    Looking for help on Indicator

    I'm trying to (one of the things), to create an entry, based of "PriceActionSwingOscillator" indicator - available for free in the shared indicator section.

    The code seems to add the higher and lower volume continuously, so I cannot find a way to discern when the swing shift occurs. Visually it is drawn correctly as I would expect, however, I cannot find where the code describes the shift in this swing.

    Attached is the picture, and on the shift from spiked GREEN volume to RED volume, I would like to enter a "sell" and vice versa. Maybe someone can look into this code, and find how I could do this? I'm also sharing, since this is a great code to use, and visually I've had successful trades, using this signal along with other coded variables, but I would LOVE to have this coded in together.

    Namely, maybe someone can figure out why it is drawing GREEN then RED volume bars, and where that shift occurs. Code wise, the volume counter doesn't shift the same way.

    Thank you for any attempt. I've spent days on this area=(.

    In simple terms, when the volume switches, how in the heck do I capture that shift, to then execute long or short - am I blind?


    The indicator also attached.

    #2
    And the indicator
    Attached Files

    Comment


      #3
      Hello lmatiukas,

      The Strategy is able to use the plots from indicator.

      Open the Data Series window from the chart, place the mouse over the indicator.
      Do you see plot values corresponding with the green and red on the chart?
      If so, these plots can be called from a script.

      Just as an example the MACD has 3 plots. If I want the value from the Avg plot I would call Print(MACD(12, 26, 9).Avg[0]);

      Use the Intelliprompt to see parameters are used for the indicator method call, and to see what public plots and properties are available.

      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        for sure, I think I'm proficient in C# and using NT8.

        I can see the plots, as they change from VLow to VHigh VISUALLY in the data box, and on the charts. The issue here is unclear how they make that change in the code since the output values remain stagnant in that; however, there has to be a draw function that would address this change?

        I've attached a screenshot with printed values. My goal is NOT to short when the bars are green, yet short when the bars are red.

        In both instances, per the printed output, V-HIGH (green lines) is considerably higher, since the volume is continually added up. Also, in both instances, V Low Current is considerably lower.
        Visually and in the data box, the first short attempt displayed "VHigh" as the number in the data box, as well as the bars were painted massive green.

        On the second short at $6.28, the output still printed V High as higher, but now the "swing" has changed somehow, and the data in the box and visually both display the lower V Low number, and red bars.

        However, as far as the printing out of the variables, nothing changes, and they are both added value. I don't understand enough how the bars are drawn, as maybe I could use that as an indicator - when the bar changes from green to red.

        I appreciate any help from a mod, or a member if anyone is able to take a look at this. I think this is a great indicator, as visually I've used it with much success with the rest of the script, but it sure would be great to figure out what in the world causes the different drawn colors, so that I could pull that variable.

        Thank you

        Comment


          #5
          Hello lmatiukas,

          Plots are set by assigning the number to the Value or Values series. The Value series is automatically created when calling AddPlot().

          These are not the same as drawing objects, whos values do not appear in a plot that is accessible from another script.

          You have mentioned that the plot value in the print does not match the data box. There are no time stamps in the prints so there is no way to verify this, as without the timestamp there is no way to know which bar the print is for, so that it can be compared to the data box.

          That said, does this indicator change the values of historical bar plots?

          Something like MyPlot[1] = 100; or MyPlot[i] = 100;

          If so, you may have to loop through previous bar values if the indicator is changing values of previous bars.

          I would recommend contacting the author of the script to inquire if this script is designed to be usable in a host script and how the author intended for this to to be called.



          If you are wanting someone to code you script for you, you can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our NinjaTrader Ecosystem team follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by rocketman7, Today, 09:41 AM
          5 responses
          16 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by frslvr, 04-11-2024, 07:26 AM
          9 responses
          124 views
          1 like
          Last Post caryc123  
          Started by selu72, Today, 02:01 PM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Started by WHICKED, Today, 02:02 PM
          2 responses
          19 views
          0 likes
          Last Post WHICKED
          by WHICKED
           
          Started by f.saeidi, Today, 12:14 PM
          8 responses
          21 views
          0 likes
          Last Post f.saeidi  
          Working...
          X