Announcement

Collapse
No announcement yet.

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<string> Zone = 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 -

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    656 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    371 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    574 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    579 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X