Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

A little help for ChartIndicators please

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

    A little help for ChartIndicators please

    Hey fellas -

    This is likely a simple question but I don't have the skill level to find the answer so I could use some help.

    I have a custom Ichimoku Cloud indicator for my strategy and I've figured out to change the Plots Colors using ChartIndicator. However, there's some other settings that aren't plots and I'm not sure how to set those values.

    Specifically, those ones under the 'General' area of the attached screenshot like Opacity and UpCloudBrush line color, etc.

    When I look at the code for the indicator (IchimokuSignal.cs), it looks like those brushes are referenced using the Direct2D1 object?

    private SharpDX.Direct2D1.Brush upAreaBrushDx, dnAreaBrushDx, upLineBrushDx, dnLineBrushDx, textBrushDx;

    Can you help?
    Attached Files

    #2
    Hello PN720,

    Thank you for the post.

    Because you have the source code and you have the ability to see what the property name is in the GUI, you should be able to deduce any of the properties needed from what you have provided. In addition because you are using ChartIndicator you would need to Cast the found indicator to the correct type.

    Looking at the image, if you wanted the "UpCloudBrush line color" the easiest way to locate the Variable for this would be to search (control + f) in the NinjaScript file for "UpCloudBrush".

    This leads to the following public property:

    Code:
    #region Properties
    
    ...
    
    [XmlIgnore]
    [Display(ResourceType = typeof(Custom.Resource), Name = [B]"UpCloudBrush line color"[/B], Order=4, GroupName = "NinjaScriptGeneral")]
    public Brush [B]UpLineBrush[/B]
    {
    	get { return upLineBrush; }
    	set { upLineBrush = value; }
    }

    UpLineBrush is the variable name, so the ChartIndciator would likely look like:

    Code:
    IchimokuSignal myIchimokuSignal		= (IchimokuSignal)ChartIndicators[0];
    myIchimokuSignal.UpLineBrush = Brushes.Red;
    Using the names you can see in the user interface will allow you to pick out any of the needed properties, All of the properties should be near the bottom of the file in the #Region Properties area.

    I look forward to being of further assistance.

    Comment


      #3
      Just what I need, thank you!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      89 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      135 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X