'What would be causing this VBA program to compile but do nothing? [Rotman Interactive Trader]
The following is my code:
Function newsArb(timeremaining)
Dim API As RIT2.API
Set API = New RIT2.API
While timeremaining <> 0
Do While Range(UB_Ask_Delta) > Range(UB_Dollar_Threshold)
OrderID = API.AddOrder("UB", UB_Order_Size * UB_Ask_QualVol, 0, 1, 0)
OrderID = API.AddOrder("GEM", (UB_Order_Size * UB_Ask_QualVol) * GEM_Ask_Ratio, 0, 1, 0)
OrderID = API.AddOrder("ETF", (UB_Order_Size * UB_Ask_QualVol) * ETF_Bid_Ratio, 0, -1, 0)
Loop
Wend
End Function
Each range value refers to a named list in an Excel spreadsheet. I was planning to replicate the above strategy a total of six times -- for the bid and ask of three securities. However, when I save it, launch Rotman, and initialize it using newsArb within Excel, it simply does not execute. Please let me know if you see anything that would cause it to not run.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|