Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cumulative delta indicator tos to ninjatrader

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

  • NinjaTrader_ChelseaB
    replied
    Hello fitmar2525,

    The SMA included with NinjaTrader is a great example of using a period.

    The public input is declared on lines 84 to 87, the default value for this is set on line 46, and the value used for calculations and barsAgo values in the logic on lines 65 through 79.

    Leave a comment:


  • fitmar2525
    replied

    How can I apply the period to this indicator that I am creating?


    protected override void OnBarUpdate()
    {
    //Value[0] = CurrentBar == 0 ? 0 : Input[0] - Input[Math.Min(CurrentBar, Perido)];

    double O = Open[0];
    double H = High[0];
    double C = Close[0];
    double L = Low[0];
    double V = Volume[0];
    double Buying = V * (C - L) / (H - L);
    double Selling = V * (H - C) / (H - L);
    double Delt = Buying - Selling;


    Value[0] = Delt;

    if (Delt > 0) {
    PlotBrushes[0][0] = BrushUpEnd;
    } else {
    PlotBrushes[0][0] = BrushDownBegin;
    }

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello fitmar2525,

    Welcome to the NinjaTrader forums!

    This thread will remain open for any community members that would like to code this for you as a convenience to you.

    You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our NinjaTrader Ecosystem team follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.


    We are happy to answer any questions you may have about NinjaScript if you decide to code this yourself.

    Below I am providing a link to a forum post with helpful information about getting started with NinjaScript and C#.
    https://ninjatrader.com/support/foru...040#post786040

    As well as a link to the help guide on the Order Flow Cumulative Delta premium indicator.
    https://ninjatrader.com/support/help...ive_delta2.htm

    Leave a comment:


  • fitmar2525
    started a topic Cumulative delta indicator tos to ninjatrader

    Cumulative delta indicator tos to ninjatrader


    HELLO FRIENDS WHO CAN HELP ME PASS THIS SCRIP FROM TOS TO NINJATRADER
    declare lower;

    input length = 10;
    def O = open;
    def H = high;
    def C = close;
    def L = low;
    def V = volume;
    def Buying = V * (C - L) / (H - L);
    def Selling = V * (H - C) / (H - L);
    def Delt = buying - selling;
    plot Delta = Delt;
    Delta.AssignValueColor(if Delta > 0 then Color.GREEN else Color.RED);
    Delta.SetPaintingStrategy(PaintingStrategy.HISTOGR AM);
    Delta.hide();
    plot zero = 0;
    zero.setDefaultColor(Color.BLUE);
    plot CumulativeVolumeDelta = sum(Delta,length);
    CumulativeVolumeDelta.AssignValueColor(if CumulativeVolumeDelta > 0 then Color.GREEN else Color.RED);
    CumulativeVolumeDelta.SetPaintingStrategy(Painting Strategy.HISTOGRAM);

Latest Posts

Collapse

Topics Statistics Last Post
Started by BGWTEX, Today, 07:20 PM
0 responses
3 views
0 likes
Last Post BGWTEX
by BGWTEX
 
Started by hayleeabb, Today, 04:21 PM
1 response
5 views
0 likes
Last Post NinjaTrader_ShawnB  
Started by mg.watts, Today, 03:17 PM
1 response
17 views
0 likes
Last Post NinjaTrader_ChrisL  
Started by JTizz, Today, 01:20 PM
1 response
8 views
0 likes
Last Post NinjaTrader_Jesse  
Started by omermirza, Today, 12:39 PM
2 responses
13 views
0 likes
Last Post omermirza  
Working...
X