Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DataBoxPrice, PriceMarkers

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

    DataBoxPrice, PriceMarkers

    Hello there,

    I would like to ask for little help. Always I do research before I need help , but in this case I could find "how to code it".

    I have indicator and this indicator drawing rectangle on price chart.
    My idea is plot also price on y-axis and mini data box. Prices high of rectangle and low too. I did see there is possibility put also color, time and many other features. Especially need to add price on y-axis.
    Any ideas ?

    thank you so much guys.

    Have nice day
    Jake

    #2
    Hello Jake,

    Thanks for your post.

    Are you wanting to replicate the mini data box or the databox? Not quite sure I am following what you want to do.

    For displaying the price, or anything text based, you can use DrawText() or DrawTextFixed() methods. Depending on what your needs are you may also want to look at the example indicator CustomPlotSample, regrettably the methods here are undocumented beyond what is included in the code.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thank you for your reply. PLease see attachments.

      Code:
      protected override void Initialize()
              {
                  Overlay                = true;
                  CalculateOnBarClose=false;
                  PriceTypeSupported=true;
                  DisplayInDataBox=true;
                  PaintPriceMarkers=true;
      I did add those 3 last lines but nothing changed. Do I need something change/add into rectangle draw setup ? Or there is more coding to complete this price markers ?
      I did see other indicators set ups, and they use CustomPlotSample. I am not programator , does it mean I need add Custom plot sample for high/low of rectangle to see price on y-axis ?

      Thank you for your time Paul.

      Jake
      Attached Files

      Comment


        #4
        Hi Jake,

        Thanks for your reply.

        The setting of DisplayInDataBox means that any plot values created by your indicator would be displayed in the Databox window or the mini databox. The Databox is a separate window that can be brought up to show all of the values associated with the chart and the charts indicators. The Databox window is brought up by left click on the charts tool bar on the icon that shows a document with a magnifier on it. (6th icon from the right). You have already found the mini databox which only shows the values of the particular panel that it is activated in.

        The PaintPriceMarkers settings means that for any plots that the indicator produces the price markers will be shown. Draw objects, such as rectangles will not generate price markers.

        You could use DrawText() to print the price values on, over or below the rectangle.
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by helpwanted, Today, 03:06 AM
        1 response
        8 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        7 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        5 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        242 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        385 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X