Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Candle with Trend

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

    Candle with Trend

    Tradestation and Think or Swim both have a chart type called Candlestick with Trend, Ninja does now. It's similar to Hollow Candles, but not really. Has anyone ever tried to code the ninja script for this. I have a Trader that wants to have all their indicators converted to Ninja to Trade on Ninja, but I don't have an indicator for this because it's usually included in the platform. I would be cool with modifying the hollow candlestick to look like this. But what would I need to start with? or do I create is new candle type completely?

    I think Hollow Candles could be used, but I need to fill the down candles. I already tried to set the BarBrushes[0] to the down color in OnBarUpdate but it doesn't work. So maybe I need to individually chart the BarType on each candle


    It looks like this:
    Attached Files
    Last edited by dmisselhorn; 09-01-2022, 08:41 AM.

    #2
    Hello dmisselhorn,

    Thank you for your post.

    You can use an indicator and paint the bars according to your calculations. Here's a basic example script that sets both the candle outline color and bar brush color based on the direction of the bar compared to the prior bar. You can modify this to use your own trend calculation.

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

    Comment


      #3
      Can I programmatically set or at least default the Candle and Wick outline width?

      Comment


        #4
        Hello dmisselhorn,

        Thank you for your reply.

        Yes, you can programmatically set the outline width for the candle and wick:

        ChartBars.Properties.ChartStyle.Stroke.Width = 5; //set candle outline width

        ChartBars.Properties.ChartStyle.Stroke2.Width = 5; // set wick width

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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        581 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        338 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        554 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        552 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X