Thanks for the tip on IntelliSense, I was able to get a position opened using the code in my first post. It works, but is not my preferred method.
The Robert Sucher (SimTradeFile2) method is giving me the following error, which is ,as you mentioned, not because of the dash.
"Runtime error: Bar number must be 1194 or greater"
" at WealthLab.Strategies.MyStrategy.Execute()
at WealthLab.WealthScript.SellAtLimit(Int32 bar, Position pos, Double limitPrice, String signalName)
at WealthLab.WealthScript.SellAtLimit(Int32 bar, Position pos, Double limitPrice, String signalName)
at WealthLab.WealthScript.a(Int32 A_0, Int32 A_1, Int32 A_2)"
The file content is a single line "-DIA160115P175;29-12-2015 15:05:00;Buy;1.35"
I added "using Community.Components;"
and I added:
CODE:
Please log in to see this code.
Getting the position open using my code from the first post works fine now that I have the DateTime hours & minutes in. The Sucher method opens the position (shows on the chart tab), but my SellAtLimit doesn't work with it, where it does work with my 1st post code.
My sellatlimit:
CODE:
Please log in to see this code.
There were two lines referencing the importing of the file and I only have the second line in my code. Is that the problem? The history isn't completely loaded?
CODE:
Please log in to see this code.