Hi,
I am looking for some direction on this problem I have.
Basically I am using a financial backtesting system called wealth-lab
www.wealth-lab.com.
I can push numbers to excel in real time using an activex script,
wealth lab cannot do this in real time without opening up a new
version on excel every time the script in wealth lab runs.
Say the bar is set to run every 5 mins a new instance of excel is
opening.
I have got round this and have posted the script below.
What I would like some direction on is this.
I connect to the activex script by creating a link to the OLE object.
I can then call a procedure
In the script below, the OLE object is :
CreateOLEObject('Intradaytradingnumbers.Class1')
and the procedure I use to push numbers to excel is
PushValueToCell6(getsymbol,formatfloat('#0,00',@uvaseries[bar-
1]),formatfloat('#0,00',@lvaseries[bar-1]),inttostr
(barinterval),signal,inttostr(bartime));
How can I recall I cell from excel into an activex prog using a
procedure that is started from wealth-lab?
The code class for pushing numbers to excel is posted below
Public Function PushValueToCell2(stockMP As String, value1 As String,
value2 As String, value3 As String, value4 As String, value5 As
String, value6 As String, value7 As String, value8 As String, value9
As String, value10 As String, value11 As String, value12 As String,
value13 As String, value14 As String, value15 As String, value16 As
String, value17 As String, value18 As String, value19 As String,
value20 As String, value21 As String, value22 As String, value23 As
String, value24 As String, value25 As String, value26 As String,
value27 As String, value28 As String, value29 As String, value30 As
String) As Boolean
'Dim frm1 As Form
'Dim Text1 As TextBox
' MsgBox (stock & " " & value)
Form1.Text1.LinkMode = 0
' MsgBox ("here")
Select Case stockMP
Case "$COMPQ"
Form1.Text1.LinkTopic = "Excel|C:\Trading files only\[Binary
patterns.xls]Binary Data From WL"
Form1.Text1.LinkItem = "R2C2"
Case "$INDU"
Form1.Text1.LinkTopic = "Excel|C:\Trading files only\[Binary
patterns.xls]Binary Data From WL"
Form1.Text1.LinkItem = "R3C2"
Case "$NDX"
Form1.Text1.LinkTopic = "Excel|C:\Trading files only\[Binary
patterns.xls]Binary Data From WL"
Form1.Text1.LinkItem = "R4C2"
Case "$OEX"
Form1.Text1.LinkTopic = "Excel|C:\Trading files only\[Binary
patterns.xls]Binary Data From WL"
Form1.Text1.LinkItem = "R5C2"
Case "$RUT"
Form1.Text1.LinkTopic = "Excel|C:\Trading files only\[Binary
patterns.xls]Binary Data From WL"
Form1.Text1.LinkItem = "R6C2"
Case "$SOX"
Form1.Text1.LinkTopic = "Excel|C:\Trading files only\[Binary
patterns.xls]Binary Data From WL"
Form1.Text1.LinkItem = "R7C2"
Case "$SPX"
Form1.Text1.LinkTopic = "Excel|C:\Trading files only\[Binary
patterns.xls]Binary Data From WL"
Form1.Text1.LinkItem = "R8C2"
End Select
Form1.Text1.LinkMode = 1
Form1.Text1.Text = (stockMP & "," & value1 & value2 & value3 & value4
& value5 & "," & value6 & "," & value7 & "," & value8 & "," & value9
& "," & value10 & "," & value11 & "," & value12 & "," & value13 & ","
& value14 & "," & value15 & "," & value16 & "," & value17 & "," &
value18 & "," & value19 & "," & value20 & "," & value21 & "," &
value22 & "," & value23 & "," & value24 & "," & value25 & "," &
value26 & "," & value27 & "," & value28 & "," & value29 & "," &
value30)
Form1.Text1.LinkPoke
'Unload frm1
PushValueToCell2 = 1
End Function
Thanks for reading this any help is appreciated
Strad
'// =======================================================
Rules : http://ReliableAnswers.com/List/Rules.asp
Home : http://groups.yahoo.com/group/vbHelp/
=======================================================
Post : [email protected]
Join : [EMAIL PROTECTED]
Leave : [EMAIL PROTECTED]
'// =======================================================
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/vbhelp/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/