Code:
Filter = 1;
Addcolumn(O,"Open");
Addcolumn(H,"High");
Addcolumn(L,"Low");
Addcolumn(C,"Close");
[COLOR=Red]This Exploration Code Gives me the Result of Open , High , Low & Close of Different Tickers ( Stock Symbols ).[/COLOR]
Now i want the same result to be displayed in excel sheet using VB Script.
EnableScript("vbscript");
<%
'The exchange of variables between the AFL and VB script
E = Name ()
'Starting Excel
Set Excel = CreateObject("Excel.Application")
'Set Excel in a state of readiness
Excel.WorkBooks.Add
Set Sheet = Excel.WorkBooks(1).WorkSheets(1)
'Writing to an Excel cell
Sheet.Cells(1,1) = Name
Sheet.Cells(1,2) = "Open"
Sheet.Cells(1,3) = "High"
Sheet.Cells(1,4) = "Low"
Sheet.Cells(1,5) = "Close"
[COLOR=Red] 'Initiation Equity maximum - will be needed
' to calculate DrawDownu
MaxE = E(0)
'Writing of the Equity and DrawDownu to Excel
For i = 0 to UBound(E)
Y = i+2
Sheet.Cells(Y,2).Value = E(i)
If E(i) > MaxE then
MaxE = E(i)
End If
Drawdown = 0 - ((MaxE - E(i))/MaxE * 100)
Sheet.Cells(Y,3).Value = Drawdown
Next
[/COLOR]
'
Sheet.Activate
Sheet.Columns(3).Select
Excel.Visible = 1
%>
Dear All,
Please help me with the above code..I want the Values of Open, High , Low , Close of all the symbols in excel sheet