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 FrazMann, Today, 11:21 AM
    0 responses
    3 views
    0 likes
    Last Post FrazMann  
    Started by geddyisodin, Yesterday, 05:20 AM
    8 responses
    51 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by cmtjoancolmenero, Yesterday, 03:58 PM
    10 responses
    36 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by DayTradingDEMON, Today, 09:28 AM
    4 responses
    24 views
    0 likes
    Last Post DayTradingDEMON  
    Started by George21, Today, 10:07 AM
    1 response
    19 views
    0 likes
    Last Post NinjaTrader_ChristopherJ  
    Working...
    X