Click here to Login








Upside-Downside and Custom Standard Deviation

by QuantShare, 3618 days ago
Share |






This function can be used to calculate Upside/Downside standard deviation or any other custom standard deviation.

As an example, let us say you want to calculate standard deviation of returns but just returns that occurred while a particular stock was trading below its long-term or 250-bar moving average. That particular standard deviation is very easy to calculate using this custom standard deviation function. You just have to type this:

a = StddevC(perf(close, 1), 200, close > open);
plot(a, "", colorRed);


Note that the function name is similar to the built-in standard deviation function. You just need to add "C" at the end of the function.
Also don't forget that you need to download the indicator first in order to use it. Just click on the "Download" link/button below.

Here is another quick example.
Calculate the difference between upside and downside standard deviation for the past 200 trading bars:

r = perf(close, 1);
up = StddevC(r, 200, r > 0);
dw = StddevC(r, 200, r < 0);
dif = up - dw;
plot(dif, "Difference between Upside and Downside standard deviation", colorBlue);


Share This ->
Share |


You have to log in to bookmark this object
What is this?
Additional Information




Type: Trading Indicator

Object ID: 1533


Country:
All

Market: All

Style:
Technical Analysis

Reviews
You must log in first

Join now
and get instant access for free to the trading software, the Sharing server and the Social network website.
Click here


Related objects

Empty

Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object

Technical Analysis


Fundamental Analysis



Random Blog Posts

How to Create a Custom Real-Time Table using QS Trading Software

Let me Show You How to Create Hundreds of Profitable Trading Systems

How to Backtest a Strategy from a Chart

How to Reference Drawing Studies in QS Formulas

Let QuantShare Manage your List of Securities

The Ultimate Guide to Create Trading Systems in QuantShare

QuantShare New Website Feature: Groups

QuantShare Trading Software: New Features in the 3.1.2 Version

Show All

Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object






QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.