Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cumulative Delta Indicator

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

    Cumulative Delta Indicator

    Originally posted by NinjaTrader_Kate View Post
    Hello Malek987,

    Thank you for your reply.

    Have you added a 1 tick data series in State.Configure? The Cumulative Delta indicator requires that be added to the hosting script that calls it.

    Also, make sure you also modify the SetUpSpreadSheet method to add another column of cells and format them, and add a label for the new column:

    Code:
    private void SetUpSpreadsheet()
    {
    OpenWorkbook(excelFile);
    excelSheet = (Excel._Worksheet)FindSheet(excelWorkBook, excelSheetName);
    if (excelSheet == null)
    {
    Alert("openError", Priority.High, "Error opening spreadsheet - check indicator parameters", "Alert1.wav", 10, Brushes.Firebrick, Brushes.Gold);
    }
    try
    {
    // Get the range of cells we want to format into an object
    excelRange = excelSheet.get_Range("A1","A201");
    // Font Color
    excelRange.Font.Color = Brushes.DarkBlue.ToOle();
    // Background Color
    excelRange.Interior.Color = Brushes.Cornsilk.ToOle();
    // Bold
    excelRange.Font.Bold = true;
    // Clear the contents
    excelRange.ClearContents();
    // Other columns
    excelRange = excelSheet.get_Range("B1","B201");
    excelRange.Font.Color = Brushes.DarkBlue.ToOle();
    excelRange.Interior.Color = Brushes.Cornsilk.ToOle();
    excelRange.Font.Bold = true;
    excelRange.ClearContents();
    excelRange = excelSheet.get_Range("C1","C201");
    excelRange.Font.Color = Brushes.Black.ToOle();
    excelRange.Interior.Color = Brushes.Cornsilk.ToOle();
    excelRange.Font.Bold = false;
    excelRange.ClearContents();
    excelRange = excelSheet.get_Range("D1","D201");
    excelRange.Font.Color = Brushes.Black.ToOle();
    excelRange.Interior.Color = Brushes.Cornsilk.ToOle();
    excelRange.Font.Bold = false;
    excelRange.ClearContents();
    excelRange = excelSheet.get_Range("E1","E201");
    excelRange.Font.Color = Brushes.Black.ToOle();
    excelRange.Interior.Color = Brushes.Cornsilk.ToOle();
    excelRange.Font.Bold = false;
    excelRange.ClearContents();
    excelRange = excelSheet.get_Range("F1","F201");
    excelRange.Font.Color = Brushes.Black.ToOle();
    excelRange.Interior.Color = Brushes.Cornsilk.ToOle();
    excelRange.Font.Bold = false;
    excelRange.ClearContents();
    excelRange = excelSheet.get_Range("G1","G201");
    excelRange.Font.Color = Brushes.Red.ToOle();
    excelRange.Interior.Color = Brushes.Cornsilk.ToOle();
    excelRange.Font.Bold = true;
    excelRange.ClearContents();
    [B]excelRange = excelSheet.get_Range("H1","H201");
    excelRange.Font.Color = Brushes.Red.ToOle();
    excelRange.Interior.Color = Brushes.Cornsilk.ToOle();
    excelRange.Font.Bold = true;
    excelRange.ClearContents();[/B]
    excelApp.Visible = true;
    excelApp.UserControl = true;
    excelOpen = true;
    excelRange = excelSheet.get_Range("A1","H1");
    excelRange.Font.Color = Brushes.Black.ToOle();
    excelRange.Interior.Color = Brushes.LightGray.ToOle();
    excelRange.Font.Bold = true;
    excelSheet.Cells[1,1] = "Date";
    excelSheet.Cells[1,2] = "Time";
    excelSheet.Cells[1,3] = "Open";
    excelSheet.Cells[1,4] = "High";
    excelSheet.Cells[1,5] = "Low";
    excelSheet.Cells[1,6] = "Close";
    excelSheet.Cells[1,7] = "Volume";
    [B]excelSheet.Cells[1,8] = "Delta Close";[/B]
    }
    catch
    {
    Alert("Exception formatting Excel", Priority.High, "Error opening spreadsheet - check indicator parameters", "Alert1.wav", 10, Brushes.Firebrick, Brushes.Gold);
    }
    
    // Set up some column colours
    
    }
    Please let us know if we may be of further assistance to you.
    Hi Kate,

    I am having difficulty getting the Cum Delta to print - I have tried to add a secondary bar type, but then I only get one bar.

    Can you help with this?

    Thanks.

    #2
    Hi, thanks for posting. We have a basic example on how to set up the Cumulative Delta here:



    Can you get the Cumulative delta to print using the Print() command or through this excel code? If the excel code is not working, I will not be able to provide and support for this because it goes outside of the scope of support I can provide.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    633 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    364 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    567 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    568 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X