Profile Picture

Volatility (ATR-based) Position Sizing

Posted By tdonnelly 3 Years Ago
Message
Posted Wednesday May 14 2014
Hi,

I noticed in some RE forum posts from a couple of years back a number of member requests for a .dll/plug-in that would allow for volatility (with a preference for ATR)-based position sizing. I looked through the various trading systems and system components available for download, but didn't see anything specifically related to this.

Did this enhancement request ever, actually, get implemented? Is anyone aware of a way to do this other than creating some custom code for it?

This is important for futures traders - but arguably would be useful for many other asset types as well.

Many thanks,

Terence
Posted Thursday May 15 2014
You will have to write some code for this. You could set up an indicator in the system designer that you would use for the size of a new position, and a trigger for when to open a position. You'd then need to write code that opened a position with the size specified by the indicator when the trigger triggered.

Let us know if you need any help with this.

Thanks,
Daniel
Posted Friday May 16 2014
Thanks, Daniel. I've started teaching myself C# as it's now clear that I'll be unable to do what I want within RE without it. Appreciate your help - and will come back to you if I'm having coding problems. -- Terence
Posted Wednesday July 16 2014
Try something like this:

long numberOfContracts = (long)(Math.Max(1,SystemData.AccountValue * _riskFactor /
                  (_atr.Current * _pointValue *
                  SystemData.AccountInfo.GetConversionRate(Symbol.CurrencyType,SystemData.AccountCurrency, QuoteType.Last) )));

Where risk factor is your desired daily target fluctuation (set as system parameter), and _atr is your Average True Range indicator, and _pointValue is Math.Max(Symbol.SymbolInformation.ContractSize,1).

That should do the trick.


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems