Register Login
Forums    February 9, 2012
TradersStudio Forums
Any examples of how to use GetInfoAboutOpenTrades function?
Last Post 04-24-2008 11:26 AM by Thomas Bengtsson. 2 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Thomas Bengtsson
New Member
New Member
Posts:11

--
04-24-2008 07:03 AM
    I am trying to access the info regarding an open trade at the end of a session but I can't get the GetInfoAboutOpenTrades function to work.

    For example, if I want the variable iEntryDate to return the entry date of the current open trade at the end of a session, does anyone have an example of what the code should look like?

    iEntryDate = GetInfoAboutOpenTrades(4, 0) clearly doesn't work

    OR

    Dim TradeInfo as Array
    GetInfoAboutOpenTrades(TradeInfo, 0)
    iEntryDate = TradeInfo[4]

    doesn't work either.

    I haven't been able to find any reference of how either GetInfoAboutOpenTrades or GetInfoAboutTrade is used in working code. I have searched the forum, the manual and the language tutorial.
    Any suggestions?
    mur ang
    Advanced Member
    Advanced Member
    Posts:525

    --
    04-24-2008 11:13 AM

    GetInfoAboutOpenTrade - correct

    GetInfoAboutOpenTrades - wrong (this is may be just typo in mail)

     

    Following example working ok for me:

     

        Buy("", 1, High, Stop, Day)
        Sell("", 1, Low, Stop, Day)
       
        Dim TradeInfo As Array
        Dim iEntryDate As Date
       
        If OpenTradeCount() <> 0 Then
            GetInfoAboutOpenTrade(TradeInfo, 0)
            iEntryDate = TradeInfo[4]
            Print iEntryDate
        End If

    Thomas Bengtsson
    New Member
    New Member
    Posts:11

    --
    04-24-2008 11:26 AM
    Murray, thanks for your quick response.

    It was my mistake. The minute after I sent the question, I realized that the session I was running did not finish with an open trade which I thought it did. The function is now working as it should.
    You are not authorized to post a reply.


     TradersStudio, Inc. ® Copyright 2004-2012 All Rights Reserved   Terms Of Use  Privacy Statement