Volume and PA the combination of success Part II Examples and Indicators

Best Binary Options Brokers 2020:
  • Binarium
    Binarium

    Best Binary Options Broker!
    Perfect Choice For Beginners and Middle-Level Traders!
    Free Demo Account! Free Education!

  • Binomo
    Binomo

    Honest broker!

Volume and PA the combination of success Part II: Examples and Indicators

Good Day Traders,

In this article I am going to continue with the volume and price action combination with some good examples and some explanation about volume indicators and the volume indicator which I use.

First of all, I use a VSA indicator for reading the volume. It’s not like the classic volume indicator in your platform. Particularly, I use the better volume indicator and it’s the most accurate and easy way for reading volumes, at least for me. So, let’s go.

If you remember, in the previous article I talked about buying and selling climax. Let’s see the first screen shot of the day. It’s from EURUSD currency pair.

As you can see in the chart there are some colors in volumes. The white color means selling climax. The red color means buying climax. The yellow color means low volume and last but not least the green color means that there is a small movement with high volume. Look at the first blue box. The yellow horizontal lines are whole numbers which they act many times as natural support and resistance levels. In the first blue box you can see that we have an increasing volume and there are two selling climax white bars. The price is moving down with solid negative candles. This means that the investors are selling heavily. But look the price hit a whole number (our support in this case). After the selling climax the investors realize that the price is in a very low level and it’s oversold, as I said in my previous article. After the two white bars it appears a red bar which is a buying climax. This is a good signal that the mini-down trend is at the end. The two white bars, the red bar after them and the whole number as a support are our signals for buying the asset right now. Look, it begins a new up- trend.

In the second blue box, you can see that we have again a selling climax but the price stop moving down and makes a reversal. This is our Price Action Signal. We have higher- lows a signal of an up- trend. We can re- enter with a call in this spot.

In this chart we have a different case. The red horizontal line is a previous resistance and a whole number, too. We have an up trend and after that as you can see in the blue box a consolidation period with low volume near to the resistance. Notice that when the price hit the resistance it appears a big white bar which is a selling volume. This is a signal that maybe it’s the end for the up- trend. Finally this is true and in next 45 minutes and more the price is moving down.

There are many ways to read the volume. Choose the indicator you like and looking for climax bars near S&R. When you have a clear confirmation of the new move of the market it’s time to trade. I recommend longer expiry.

Technical Analysis Strategies for Beginners

Many investors analyze stocks based on their fundamentals – such as their revenue, valuation or industry trends – but fundamental factors aren’t always reflected in the market price. Technical analysis seeks to predict price movements by examining historical data, mainly price and volume.

It helps traders and investors navigate the gap between intrinsic value and market price by leveraging techniques like statistical analysis and behavioral economics. Technical analysis helps guide traders to what is most likely to happen given past information. Most investors use both technical and fundamental analysis to make decisions.

Choose the Right Approach

There are two different ways to approach technical analysis: the top-down approach and the bottom-up approach.   Often times, short-term traders will take a top-down approach and long-term investors will take a bottom-up approach.

Best Binary Options Brokers 2020:
  • Binarium
    Binarium

    Best Binary Options Broker!
    Perfect Choice For Beginners and Middle-Level Traders!
    Free Demo Account! Free Education!

  • Binomo
    Binomo

    Honest broker!

  • Top-Down. The top-down approach is a macroeconomic analysis that looks at the overall economy before focusing on individual securities. A trader would first focus on economies, then sectors, and then companies in the case of stocks. Traders using this approach focus on short term gains as opposed to long term valuations. For example, a trader may be interested in stocks that broke out from their 50-day moving average as a buying opportunity.
  • Bottom-Up. The bottom-up approach focuses on individual stocks as opposed to a macroeconomic view. It involves analyzing a stock that appears fundamentally interesting for potential entry and exit points. For example, an investor may find an undervalued stock in a downtrend and use technical analysis to identify a specific entry point when the stock could be bottoming out. They seek value in their decisions and intend to hold a long term view on their trades. (For related reading, see: Bottom-Up and Top-Down Investing Explained.)

In addition to these considerations, different types of traders might prefer using different forms of technical analysis. Day traders might use simple trendlines and volume indicators to make decisions, while swing or position traders may prefer chart patterns and technical indicators. Traders developing automated algorithms may have entirely different requirements that use a combination of volume indicators and technical indicators to drive decision making. 

QuantStrat TradeR

Trading, QuantStrat, R, and more.

Nuts and Bolts of Quantstrat, Part II

Last week, I covered the boilerplate code in quantstrat.

This post will cover parameters and adding indicators to strategies in quantstrat.

Let’s look at a the code I’m referring to for this walkthrough:

This code contains two separate chunks–parameters and indicators. The parameters chunk is simply a place to store values in one area, and then call them as arguments to the add.indicator and add.signal functions. Parameters are simply variables assigned to values that can be updated when a user wishes to run a demo (or in other ways, when running optimization processes).

Indicators are constructs computed from market data, and some parameters that dictate the settings of the function used to compute them. Most well-known indicators, such as the SMA (simple moving average), EMA, and so on, usually have one important component, such as the lookback period (aka the ubiquitous n). These are the parameters I store in the parameters chunk of code.

Adding an indicator in quantstrat has five parts to it. They are:

1) The add.indicator function call
2) The name of the strategy to add the indicator to (which I always call strategy.st, standing for strategy string)
3) The name of the indicator function, in quotes (E.G. such as “SMA”, “RSI”, etc.)
4) The arguments to the above indicator function, which are the INPUTS in this statement arguments=list(INPUTS)
5) The label that signals and possibly rules will use–which is the column name in the mktdata object.

Notice that the market data (mktdata) input to the indicators has a more unique input style, as it’s wrapped in a quote() function call. This quote function call essentially tells the strategy that the strategy will obtain the object referred to in the quotes later. The mktdata object is initially the OHLCV(adjusted) price time series one originally obtains from yahoo (or elsewhere), as far as my demos will demonstrate for the foreseeable future. However, the mktdata object will later come to contain all of the indicators and signals added within the strategy. So because of this, here are some functions that one should familiarize themselves with regarding some time series data munging:

Op: returns all columns in the mktdata object containing the term “Open”
Hi: returns all columns in the mktdata object containing the term “High”
Lo: returns all columns in the mktdata object containing the term “Low”
Cl: returns all columns in the mktdata object containing the term “Close”
Vo: returns all columns in the mktdata object containing the term “Volume”
HLC: returns all columns in the mktdata object containing “High”, “Low”, or “Close”.
OHLC: same as above, but includes “Open”.

These all ignore case.

For these reasons, please avoid using these “reserved” terms when labeling (that is, column naming in step 5) your indicators/signals/rules. One particularly easy mistake to make is using the word “slow”. For instance, a naive labeling convention may be to use “maFast” and “maSlow” as labels for, say, a 50-day and 200-day SMA, respectively, and then maybe implement an indicator that uses an HLC for an argument, such as ATR. This may create errors down the line when more than one column has the name “Low”. In the old (CRAN) version of TTR–that is, the version that gets installed if one simply types in

the SMA function will still append the term “Close” to the output. I’m sure some of you have seen some obscure error when calling applyStrategy. It might look something like this:

This arises as the result of bad labeling. The CRAN version of TTR runs into this from time to time, and if you’re stuck on that version, a kludge to work around this is instead of using

instead. That [,1] specifies only the first column in which the term “Close” appears. However, I simply recommend upgrading to a newer version of TTR from R-forge. On Windows, this means using R 3.0.3 rather than 3.1.1, due to R-forge’s lack of binaries for Windows for the most recent version of TTR (only source is available), at least as of the time of this writing.

On a whole, however, I highly recommend avoiding reserved market data keywords (open, high, low, close, volume, and analogous keywords for tick data) for labels.

One other aspect to note about labeling indicators is that the indicator column name is not merely the argument to “label”, but rather, the label you provide is appended onto the output of the function. In DSTrading and IKTrading, for instance, all of the indicators (such as FRAMA) come with output column headings. So, when computing the FRAMA of a time series, you may get something like this:

When adding indicators, the user-provided label will come after a period following the initial column name output, and the column name will be along the lines of “FunctionOutput.userLabel”.

Beyond pitfalls and explanations of labeling, the other salient aspect of indicators is the actual indicator function that’s called, and how its arguments function.

When adding indicators, I use the following format:

This is how these two aspects work:

The INDICATOR_FUNCTION is an actual R function that should take in some variant of an OHLC object (whether one column–most likely close, HLC, or whatever else). Functions such as RSI, SMA, and lagATR (from my IKTrading library) are all examples of such functions. To note, there is nothing “official” as opposed to “custom” about the functions I use for indicators. Indicators are merely R functions (that can be written by any R user) that take in a price series as one of the arguments.

The inputs to these functions are enclosed in the arguments input to the add.indicator function. That is, the part of the syntax that looks like this:

These arguments are the inputs to the function. For instance, if one would write:

In this case, x is a time series based on the market data (that is, the mktdata object), and n is a parameter. As pointed out earlier, the syntax for the mktdata involves the use of the quote function. However, all other parameters to the SMA (or any other) function call are static, at least per individual backtest (these can vary when doing optimization/parameter exploration). Thus, for the classic 200-day simple moving average, the appropriate syntax would contain:

In my backtests, I store the argument to n above the add.indicator call in my parameters chunk of code for ease of location. The reason for this is that when adding multiple indicators, signals, and rules, it’s fairly easy to lose track of a hard-coded value among the interspersed code, so I prefer to keep my numerical values collected in one place and reference them in the actual indicator, signal, and rule syntax.

Lastly, one final piece of advice is that when constructing a strategy, one need not have all the signals and rules implemented just to check how the indicators will be added to the mktdata object. Instead, try this, after running the code through the add.indicator syntax and no further if you’re ever unsure what your mktdata object will look like. Signals (at least in my demos) will start off with a commented

bit of syntax. If you see that line, you know that there are no more indicators to add. In any case, the following is a quick way of inspecting indicator output.

For example, using XLB:

Which would give the output:

This allows a user to see how the indicators will be appended to the mktdata object in the backtest. If the call to applyIndicators fails, it means that there most likely is an issue with labeling (column naming).

Next week, I’ll discuss signals, which are a bit more defined in scope.

Best Binary Options Brokers 2020:
  • Binarium
    Binarium

    Best Binary Options Broker!
    Perfect Choice For Beginners and Middle-Level Traders!
    Free Demo Account! Free Education!

  • Binomo
    Binomo

    Honest broker!

Like this post? Please share to your friends:
Binary Options Trading Step By Step
Leave a Reply

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: