Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Non readable drawings on Panel Custom Indicator

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

    Non readable drawings on Panel Custom Indicator

    Hello, I'm building a NinjaScript Strategy based on Custom Indicators, the problem is that there is an indicator that is drawn on a panel but it does not have plot parameters in its configuration, so I cannot read the drawings it makes; I need to know when it make a drawing as part of a sign, I've attached a image with de panel drawings, those drawings are not selectable by the GUI, is there any chance to read them?
    Thanks

    #2
    Hello Quanto,

    Thank you for your note.

    If the indicator does not create some kind of exposed value that changes to indicate when the drawings are created, it would need to be modified to do so. If the indicator is open source you may be able to take a look at the code and create an exposed series that for example might have a value of 0 when no drawing is present, 1 when red and 2 when green, however, you can only do this if the code for the indicator is editable in the NinjaScript Editor. An example of exposing a series that is not a plot may be found in our help guide here:



    If the indicator was obtained from a third party vendor, these are often distributed as compiled assemblies, and the code cannot be edited. In this case, you would need to reach out to the vendor to see if those could be added to the indicator, however, in most cases this would not be possible.

    The final option would be to reproduce the logic the indicator uses to determine whether or not to draw those objects within your strategy itself, but you'd have to be able to reproduce those calculations which may not be possible if you don't know exactly how the indicator calculates those.

    Please let us know if we may be of further assistance to you.

    Comment


      #3
      Thanks Kate W.

      I already did it, I used the BackBrush property to read the color changes on the indicator, here is the solution for anyone who need it:

      protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
      {
      ChartObjectCollection<NinjaTrader.Gui.NinjaScript. IndicatorRenderBase> indicatorCollection = chartControl.Indicators;

      foreach (NinjaTrader.Gui.NinjaScript.IndicatorRenderBase indicator in indicatorCollection)
      {
      try
      {
      if(indicator.Name=="CustomIndicatorName")
      {
      Print("BackBrush: "+indicator.BackBrush);//This value could be used as signal
      }
      }
      catch(Exception ex)
      {
      Print("EX:"+ex.Message);
      }
      }
      }

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      54 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      130 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      72 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      44 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      49 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X