Monday, December 01, 2008     | Register
TradersStudio Forums
Subject: Any examples of how to use GetInfoAboutOpenTrades function?

You are not authorized to post a reply.   
Author Messages
tbengtsson
Posts:9

04-24-2008 7:03 AM Alert 
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Β]

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?
murray
Posts:431

04-24-2008 11:13 AM Alert 

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Β]
        Print iEntryDate
    End If

tbengtsson
Posts:9

04-24-2008 11:26 AM Alert 
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.
Forums > TradersStudio 2.x > TradersStudio Basic > Any examples of how to use GetInfoAboutOpenTrades function?



ActiveForums 3.6
TradersStudio® Copyright 2004-2008 All Rights Reserved   |  Privacy Statement  |  Terms Of Use