Profile Picture

Trading System Query

Posted By Omega1 5 Years Ago
Posted Sunday January 08 2012

I'm having a look at the bollingerpenetration system to get an idea of how RE systems hang together. Once done I'll then be able to look at migrating some of my own code.

First of all, I notice that bollingerpenetration is long only but while I see how orders get entered the mechanism for how trades get closed isn't so clear. From what I see with my untrained eye it looks like the system should just keep buying until it runs out of money. Can someone explain how this system closes it positions?

Secondly, entries (and I assume exits) dont seem to be named.The position list report doesn't show the name of the entry that resulted in a new position. So, given a system that has multiple methods for entering or exiting how would i know which piece of system logic triggered that particular action?

Thirdly, what determines how many shares or contracts get bought. The simulation I ran started out buying about 50 shares per entry. Where are these position sizes configured? Perhaps there's a sample system that shows exposure management more clearly?

Is there a report, and an object that I can query in code, which shows account exposure by order and cumulative exposure aside from number of units taken?



Posted Monday January 09 2012
You can set default profit targets, stop losses, and bar timeouts in the system properties window. That is probably what is causing positions to close in this case. There are also allocation settings here that can control the position size.

You can also control all of this via code. Create a PositionSettings object, set the properties you want on it, and then pass the PositionSettings object to the OpenPosition method.

You can set the Description property of the PositionSettings object, and this will show up as the description on the position and the trade that opened it in the position results. Exits can also be named if you are submitting the exit order via code.

There is an Exposure property on the Position class that you can access. You can also get more aggregate statistics via SystemData.SystemStatistics.


Posted Monday January 09 2012

Thanks. I stumbled across the system parameters dialogue earlier today but thanks for the update. I'll bear your other points in mind as I get more comfortable with how things hang together.


Similar Topics

Reading This Topic

2005-2017 © RightEdge Systems