Monday, January 05, 2009     | Register
TradersStudio Forums
Subject: Trade certain stocks only

You are not authorized to post a reply.   
Author Messages
stroj
Posts:17

06-02-2006 7:47 AM Alert 

With fundamental analysis I prepare a list of stocks every day which can be traded on this day(between 0 and 10 stocks per day). The Symbols are in an Excel sheet: Column 1: Date, Column 2: StockSymbol, Column 3: Ranking of stock (Rank 1: This stock will be bought first).

Now I want to backtest different entry, exit and money management strategies with TradersStudio.

Is it possible to use this Excel sheet together with TradersStudio so that only the stocks with the particular date will be bought/sold on this day if entry conditions are true?

This appraoch could also be used for discretionary pre-selection of trades.

murray
Posts:435

06-02-2006 8:20 AM Alert 

Yes it is possible. I am not sure of the best way to do it. I know we can read asc files from the script.  Another possiblity is to use a access database . I know they were working on a database addin a long time ago which got put a side. If it is useful for this type of analysis maybe it might have some life.

    Let me put something together and think about it a little. Please post to remind me if I don't do anything by Tuesday.

 

  

stroj
Posts:17

06-07-2006 5:46 PM Alert 
Murray,
any new ideas to solve this?
murray
Posts:435

06-07-2006 10:07 PM Alert 

Code for reading a file from a trade plan

Sub FileTestPlan()
    Dim FSO As New Scripting.FileSystemObject
    Dim TS As Scripting.TextStream
    Dim items As Array
    Dim i As Integer
 
    Cls
 
    TS = FSO.OpenTextFile("c:\test.txt")
 
    While Not TS.AtEndOfStream
        items = Split(TS.ReadLine, ",")
        For i = 0 To UBound(items) - 1
            Print items[i]
        Next
    Wend
End Sub

stroj
Posts:17

06-09-2006 4:47 PM Alert 
Thank you.
Can you please add some explanations or comments with the code?
stroj
Posts:17

06-20-2006 12:15 PM Alert 
Murray,
it´s difficult for me to understand this code without comments because I don´t find the functions/expressions in the language dictionary.

When I try to verify the code I get error messages.

Any help would be apreciated.

murray
Posts:435

06-20-2006 12:44 PM Alert 

You should look at the on line help , the processor topic. In addition we have a chapter on writing trade plans in the book on TradersStudio Basic Learning by Example.

  If the chapter does not help , then I will put together some other materials to post here.

 

stroj
Posts:17

06-28-2006 7:18 AM Alert 

I studied the chapter and have more understanding of the concept now.

But I would appreciate a more complete code sample or additional code samples.

Thank you!

You are not authorized to post a reply.



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