What you are describing simply can not happen if you've re-implemented everything properly. I double checked that everything works with some dummy data from CSV file.
1. First of all, make sure the code is free from glaring errors like this one:
CODE:
Please log in to see this code.
i.e. starting the trading loop at bar 20 when using a 100-period SMA for making trades.
2. Your published code doesn't even compile. Although the fix is evident to me, the difference between what you post and what you actually run has great sense.
3. I'd suggest to copy the code into a brand new Strategy window.
4. Next, you don't really need
hasData because it's superfluous. Being an integer,
FillSeriesFromFile already returns the number of processing errors so your code may continue processing when it's 0 (no errors encountered).
5. Finally, mind the strategy message queue in the Editor -- there can be runtime error messages you're overlooking and that could explain the lack of results.
To stress my point, everything works here and if you want to prove otherwise, please debug your strategy first and then present a complete case that includes: actual code (that compiles), ASCII data (or symbol names if it could be replaced by some publicly accessible data e.g. Yahoo or Google), external data series, data loading settings, position sizing. Thanks.