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

Help with Oscillator

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

    Help with Oscillator

    I am using the wizard to try to plot a relatively simple indicator.
    I have it partly right but what I need help with is how to make one of the plots the central horozontal straight zero line, for the other two plots to oscillate around. The Zero line would have a calc as such: ZeroPlot = Typical (([0]+[1]+[2]) /3). Then I want to see where the other plots are relative to this one. One would be the simply the "Close", the other the "Median".
    All I have achieved so far is the lines are all plotted but relative to price. By that I mean there is a price scale down the right hand side and the "Zero Line" is literally Zero, Zero $.
    The other 2 plots are plotting relative to price rather than the difference to the ZeroPlot.
    Can someone please help me with this?

    #2
    Hello KennyK,

    Thanks for your post.

    If you are plotting close and median you would expect those to be at the price of the instrument. The math on the Typical would produce a value that is closer to zero. After dividing to find the average you would then need to add back some value to offset back to the current price.

    I'm not entirely clear on what you are trying to accomplish. A zero line would imply a static condition.
    Can you share the code you are using for all 3 plots?
    Do you have a screenshot or example that shows what you are looking to accomplish?
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      More Clarity

      Hi Paul, Thanks for your reply.
      I have attached some screenshots and will attempt to explain so you can hopefully understand.
      Capture 1 shows what indicators I would normally have on the price chart.
      1. SMA Median - 1 period, (white).
      2. SMA Typical - 3 period, (yellow).
      What is important to me is to know where the close and the median is in relation to the typical.
      You can see in window 2 below the price chart is the indicator I am working on.

      Capture 2 shows the same except with the chart style changed to close only.
      This demonstrates the information I want in window 2, EXCEPT, I want to show the typical as a horizontal straight line, and just have the median and close lines oscillate around it showing how far plus or minus they are from the typical.

      Then once I have that working I will want to make the typical change colour when rising, falling or flat.

      Hope you get the gist of that.

      Cheers,
      Ken.
      Attached Files

      Comment


        #4
        Sorted.

        Paul,
        I have worked it out, please see attached screenshot.
        Cheers,
        Ken.
        Attached Files

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Waxavi, Today, 02:10 AM
        0 responses
        1 view
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by TradeForge, Today, 02:09 AM
        0 responses
        2 views
        0 likes
        Last Post TradeForge  
        Started by Waxavi, Today, 02:00 AM
        0 responses
        2 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by elirion, Today, 01:36 AM
        0 responses
        4 views
        0 likes
        Last Post elirion
        by elirion
         
        Started by gentlebenthebear, Today, 01:30 AM
        0 responses
        4 views
        0 likes
        Last Post gentlebenthebear  
        Working...
        X