Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

handling multi objects in one List or Array theory

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

    handling multi objects in one List or Array theory

    I'm pretty new to programming and C#. So I'm probably going to show how little I really know about programming. Here's what I'm trying to do. I'm trying to get a few different objects, one int, 2 IRays, and an IRectangle, into one Array or a List that I can then do tests on and redraw or delete out of that List.

    So here's what I have so far

    PHP Code:
    if (condition
    {
                            
    Draw IRay 
    Draw IRay2 
    Draw IRectangle   
    //draws a rectangle using the two IRays for a range
    count 0;  // store a reference so we can count if price has penetrated our rectangle
                                
                            
    List<stringZone = new List<string>();
    {
    ZoneCache.Add(count);
    ZoneCache.Add(IRay);
    ZoneCache.Add(IRay2);
    ZoneCache.Add(IRectangle);    

    Maybe I'm not using the right structure to do this. I'm thinking if this doesn't work maybe I have to make it into a class??? Needless to say it's not working!
    Thanks,
    Last edited by APA Zones; 03-02-2011, 11:07 PM.

    #2
    doubletop, thanks for the post - unfortunately lists / arrays are a more general C# topic we could not provide support here for. I would first of all pick one draw object and ensure it's plotting correctly as you need it, then in the next step try changing some properties through the IDrawObject interface NT7 has -



    Finally you could then work with the complete draw object collection for your primary chart series -

    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by jeronymite, 04-12-2024, 04:26 PM
    3 responses
    39 views
    0 likes
    Last Post jeronymite  
    Started by bill2023, Today, 08:51 AM
    2 responses
    15 views
    0 likes
    Last Post bill2023  
    Started by sidlercom80, 10-28-2023, 08:49 AM
    167 responses
    2,260 views
    0 likes
    Last Post jeronymite  
    Started by warreng86, 11-10-2020, 02:04 PM
    7 responses
    1,362 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by Perr0Grande, Today, 08:16 PM
    0 responses
    5 views
    0 likes
    Last Post Perr0Grande  
    Working...
    X