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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        152 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        305 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        244 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        345 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        176 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X