Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Best variable to access to find last order entry price?

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

    Best variable to access to find last order entry price?

    I am trying to find a way to set a boolean value to determine if my present price is above my last order's entry price.

    Here is my code (that doesn't work because entry.price is an object, not the actual price alone):

    Code:
     
    if (Performance.AllTrades.Count > 0)
    { Trade lastTrade2 = Performance.AllTrades[Performance.AllTrades.Count - 1 ];
    Print(lastTrade2.Entry.Price);
    if (lastTrade2.Entry.Price > GetCurrentAsk())
    allowentry = true;
    else
    allowentry = false;
    }
    else allowentry = true;
    When I look in my output window, this is the result:

    2/14/2008 12:40:00 PM 116.484375

    I want only the price, not the date or entire object variable. It looks ilke lastTrade2.Entry.Price is an object, not a double [notice the date too] of the price alone. Whats the best way to access this?

    [another variable?]

    #2
    oops. figured this out... the beta i'm using (post 6.508) preappends a date to all output data. that in fact is only price and convertable straight into double.

    all is ok.

    Comment


      #3
      Is this Beta 9? The time stamp is likely just a output window time stamp and not coming as part of the price.
      RayNinjaTrader Customer Service

      Comment


        #4
        Got it, Beta 9 we removed this time stamp again, it was a mistake.
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        639 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        366 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        107 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        569 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        572 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X