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

Possible to color Price columns via Script ?

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

    Possible to color Price columns via Script ?

    Hello,

    I need to color the price column in superdom at a specific price level.

    For example i need to paint in blue the last daily close.

    Is it possible via script, once i havent found on superdom options.

    Thks

    #2
    Hello eliastemponi,

    Thank you for the post.

    In this case, you have two ways to do this. You can either use an Indicator or create a custom Superdom Column.

    An indicator would be easiest, you could use the Prior Day OHLC indicator and select the Prior Close. You can also give the plot any color you would like and then it will display in the Price column.

    You can also review the existing superdom columns to see how those plot, it is also possible to plot next to the price column.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thank you Jesse,

      It was much easier than i thought.

      Just one more doubt.
      I'm having a divergence on last close values:
      The last close for ES 12-18 on market analyzer is 2915,00 and using the Prior Close indicator I get 2916,50.

      Why is it different ?

      Sorry if it´s a very simple doubt.

      Comment


        #4
        Hello eliastemponi,

        Thank you for the reply.

        This value actually can differ in this case. The LastClose in the Market Analyzer is being provided from the data provider whereas the PriorClose uses the currently downloaded data and session information to find this value.

        The difference is both in the syntax used to get this value and also the data being used.

        To recreate the LastClose specifically in the superdom, you could copy the syntax from the market analyzer column and recreate it as a superdom column or indicator.


        Here is an example of the syntax you would use in an indicator to get the LastClose:

        Code:
        protected override void OnMarketData(Data.MarketDataEventArgs marketDataUpdate)
        {
        	if (marketDataUpdate.MarketDataType == Data.MarketDataType.LastClose)
        		Value[0] = marketDataUpdate.Price;
        }



        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Sparkyboy, Today, 10:57 AM
        0 responses
        0 views
        0 likes
        Last Post Sparkyboy  
        Started by TheMarlin801, 10-13-2020, 01:40 AM
        21 responses
        3,915 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by timmbbo, 07-05-2023, 10:21 PM
        3 responses
        151 views
        0 likes
        Last Post grayfrog  
        Started by Lumbeezl, 01-11-2022, 06:50 PM
        30 responses
        808 views
        1 like
        Last Post grayfrog  
        Started by xiinteractive, 04-09-2024, 08:08 AM
        3 responses
        11 views
        0 likes
        Last Post NinjaTrader_Erick  
        Working...
        X