Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarColor based on Slow Stochastic

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

    BarColor based on Slow Stochastic

    Hi All,

    I would like to create an indicator based on the %D slope of the 12, 5, 5 slow stochastic. So if the %D turns up the bars should be green, if it turns down the color should be red.

    I have to say that I have no experience in creating indicators at all. So this seems to be tough.

    Help is highly appreciated...thanks

    Here is what I found in the help guide as an example:

    // Sets the bar color to yellow
    BarColor = Color.Yellow;
    // Sets the bar color to its default color as defined in the chart properties dialog
    BarColor = Color.Empty;
    // Sets the bar color to yellow if the 20 SMA is above the 50 SMA and the closing
    // price is above the 20 SMA (see image below)
    if (SMA(20)[0] > SMA(50)[0] && Close[0] > SMA(20)[0])
    BarColor = Color.Yellow;

    #2
    Unfortunately we don't provide support down to the level actually coding an indicator, but here is the general direction:
    - you would need to custom code a new NS indicator
    - this indicator likely will need to use the Stochastics() function
    - the Stoachstics provides a "D" data series which you could access for comparison

    As a last resort a certified NinjaScript consultant would be at your help: http://www.ninjatrader.com/webnew/pa...injaScript.htm

    Comment


      #3
      Ok, thanks.

      Without any experience in coding, creating an indicator is impossible for me...
      Hoped that this could have been done easier.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      166 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      320 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      246 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      350 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      179 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X