Detroit, MI
Posts: 15 since Oct 2010
Thanks Given: 0
Thanks Received: 3
|
Is there an indicator or does anybody know the easy language code for calculating a rolling sharpe ratio to using for determining trend?
I'm looking to generate a signal if this "custom sharpe indicator" crosses above and below zero. I tested this in excel and it works really well to determine an exit of a trend and formation of new trend.
I took the return over e.g. 20 5 minute bars and divided it by the standard deviation. If negative, downtrend. If positive, uptrend. If crosses above / below zero, the trend changed.
Anyone using something like this or know how to program so that you're calculating return over x number of bars and dividing by standard deviation over x number of bars?
Thanks,
Tim
|