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
    Kate W.NinjaTrader Customer Service

    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.
        Kate W.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Karado58, 11-26-2012, 02:57 PM
        8 responses
        14,828 views
        0 likes
        Last Post Option Whisperer  
        Started by Option Whisperer, Today, 09:05 AM
        0 responses
        1 view
        0 likes
        Last Post Option Whisperer  
        Started by cre8able, Yesterday, 01:16 PM
        3 responses
        11 views
        0 likes
        Last Post cre8able  
        Started by Harry, 05-02-2018, 01:54 PM
        10 responses
        3,204 views
        0 likes
        Last Post tharton3  
        Started by ChartTourist, Today, 08:22 AM
        0 responses
        6 views
        0 likes
        Last Post ChartTourist  
        Working...
        X