• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help Recognizing New Rays

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

    Help Recognizing New Rays

    Hi, I started editing code on this indicator to expose the swing plots so it can be used for a strategy. It's based on Ninjatrader's swing indicator and it plots highs and lows that extend until broken. When I tried implementing it in a strategy, it only recognized only the first high or low that plotted on a chart. I need the most recent swing high or low to be recognized and not just the first swing high or low that occurs.

    I added the two new data series on line 29 and 30. They are initialized as a class on lines 58 and 59. I also set it as a double in lines 135 and 195. And finally, I added the data series to the properties in lines 210 and 217.

    I can't tell what I've done wrong here but no strategy I use this indicator with can identify the most recent swing high or low with this code. Can you tell me what I did wrong? I tried using the Ninjatrader Swing indicator as a reference because I know that works well. I can't figure out what I did wrong here.

    (The indicator is publicly available by the way. I just need help on a slight modification I'm making because the old code was incomplete)
    Attached Files

    #2
    Hello khari998,

    Thank you for your note.

    In the support department at NinjaTrader we do not create, debug, or modify code for our clients. This is so that we can maintain a high level of service for all of our clients.

    I would suggest seeing the following example for which demonstrates three different ways to expose a data series to a strategy. You could compare your current script to the script at the link as a means of debugging your script.

    https://ninjatrader.com/support/foru...90&postcount=2

    I would suggest adding print statements to your indicator to confirm desired values are being set to a series within the indicator, and thus can be referenced. I’ve provided a link to a youtube video which covers an example of using prints to understand behavior:

    https://www.youtube.com/watch?v=K8v_...tu.be&t=48m45s

    If you’d like I could have someone from our business development team pass over a list of third party developers that you could contact about debugging your code.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rblunsom, Today, 11:19 AM
    2 responses
    20 views
    0 likes
    Last Post guidoisot  
    Started by drewski1980, Today, 02:38 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by jfep1977, Today, 02:31 PM
    2 responses
    10 views
    0 likes
    Last Post jfep1977  
    Started by dmking, Today, 12:39 PM
    6 responses
    22 views
    0 likes
    Last Post dmking
    by dmking
     
    Started by marioresa, Today, 10:15 AM
    4 responses
    26 views
    0 likes
    Last Post marioresa  
    Working...
    X