Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Working version of Current Market Price line on chart for NT8

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

    Working version of Current Market Price line on chart for NT8

    Hi, I am looking for a way to show a lin at the current price on the chart. I ahve search here and found few indicators but they fail to import in NT*8

    #2
    Hello,

    Thanks for your post.

    The easiest way is to use a Simple Moving Average indicator (SMA) with the following settings:
    1) Set the period to 1
    2) Set the calculate mode to OnEachTick
    3) Change the SMA plotstyle from "Line" to "Horizontal Line".

    This will produce a horizontal line at the current price that changes as price changes.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Where have you been all my (trading) life...........
      I've been asking for this built-in or NT Indicator (bordering on ranting when not in NT8, shame on me) so as not to use an unsupported 3rd Party indie, and no-one has ever suggested this sublimely simple and elegant solution (neither had I thought of it)
      I doff my cap to you, Sir

      Comment


        #4
        Hello soon123,

        Could you please post a screenshot that shows the SMA settings. When I test it on my end, it works as expected.

        I don't see the SMA name listed in the upper left corner of the chart in your screenshot. Did you remove the text in the Label setting for the SMA?

        Attached Files
        JasonNinjaTrader Customer Service

        Comment


          #5
          Unfortunately I'm not a programmer myself - I don't know how to accomplish this in NinjaScript. I will assign this forum thread to the NinjaScript queue. Please expect a response later today.
          JasonNinjaTrader Customer Service

          Comment


            #6
            Hello soon123,

            The directions provided were to manually add the SMA to the chart, you may want to try that approach to see how it works.

            It appears you are trying to add this through a strategy using AddChartIndicator. It still can be done and while you are using a 1 period SMA and Calculate.OnEachTick, you need to change the PlotStyle from Line to HLine (horizontal line).

            Try this:

            else if (State == State.DataLoaded)
            {
            AddChartIndicator(SMA(1));
            SMA(1).Plots[0].PlotStyle = PlotStyle.HLine;
            }
            Paul H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by jeronymite, 04-12-2024, 04:26 PM
            3 responses
            40 views
            0 likes
            Last Post jeronymite  
            Started by bill2023, Today, 08:51 AM
            2 responses
            16 views
            0 likes
            Last Post bill2023  
            Started by sidlercom80, 10-28-2023, 08:49 AM
            167 responses
            2,260 views
            0 likes
            Last Post jeronymite  
            Started by warreng86, 11-10-2020, 02:04 PM
            7 responses
            1,362 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by Perr0Grande, Today, 08:16 PM
            0 responses
            5 views
            0 likes
            Last Post Perr0Grande  
            Working...
            X