Profile Picture

Position Problem

Posted By sjsgroup 2 Years Ago
Message
Posted Tuesday February 03 2015
Hi,

After doing a lot of testing & evaluating of RE on my laptop, I decided to test larger scale simulations & optimizations on another workstation.  On the laptop I have a very basic test strategy and I create a log file of events & activity for debug purposes.  When I call OpenPosition() and pass in a position settings object, everything works fine and I see the OrderFilled event fire immediately in my debug log. 

However, when I moved the code to the main workstation for more robust testing I find that none of my OpenPosition calls are resulting in any OrderFilled events firing.  And as expected, when I run any simulation or optimization I don't get any trades in the resulting System Results tab.  I've verified that all my parameters & system settings are the same and my debug log shows me making the OpenPosition call, but no OrderFilled event follows.

Any ideas on what could be wrong here before I try an uninstall & reinstall?

thanks,
Steve




Posted Wednesday February 04 2015
Follow up note - the sample crossover system (untouched) is not showing trades either, but does on the laptop for the same instrument/bar data.

Are any folders used during a simulation for data storage other than c:/users/<username>/roaming/Yye_Software/RightEdge/2010.1.0.0 - maybe this is a permission issue of some sort?

Steve

Posted Wednesday February 04 2015
After calling OpenPosition(), check the Error property of the position that is returned.  If it has a value it means there was an error trying to open the position, and the value will tell you what the problem was.

Also make sure you're checking for the OrderCancelled event in addition to the OrderFilled event.

Let us know if this helps.

Thanks,
Daniel
Posted Wednesday February 04 2015
Issue resolved in the category of "newb oversight".

The position error was null after calling OpenPosition, but the state was pending and it turns out it was getting cancelled with an error about not enough cash with starting capital set to 1,000,000.

Sometimes it helps to set the initial margin to something other than zero!

thanks for the help,
Steve



Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems