# algorithmic trading. not only forex. not only python.

The three key components of the force index are the direction of price change, the extent of the price change and the trading volume. Sign up using Facebook.

## Algorithmic Trading

Anyway a smart Programme, if approved as financially feasible. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service , privacy policy and cookie policy , and that your continued use of the website is subject to these policies. Mt4 Probability Script Ask Question. A, B, Pattern A represents a bullish pattern Pattern B represents a bearish pattern basically looking for how strong is the probability A or B reoccurring out of the two which has a higher chance of reoccurring, Here is where I am stuck I have no idea how to put that together Here is what I have so far: Could you elaborate how do you get the quotes from MT4?

I'm not understanding how do you connect the python script to MT4 to get the data. How to put that together? Have a Realistic Plan - best before one puts the money on table. Similarly, volume is added into the calculation to give a greater sense of the degree of bulls or bears' victories.

Volume also indicates the level of momentum in the market, as propelled by the power of either bulls or bears. Force index is one of the best indicators for combining both price and volume into a single readable figure. When force index hits a new high, a given uptrend is likely to continue. When force index hits a new low, the bears have greater strength and the downtrend will usually sustain itself. A flattening force index is also an important situational circumstance for traders.

A flattening force index means that the observed change in prices is not supported by either rising or declining volume and that the trend is about to reverse. On the opposite side of the matter, a flattening force index could indicate a trend reversal, if a high volume corresponds with only a small move in prices. So, this is the basic manner in which force index can be used alone, or in conjunction with a moving average, to identify whether bulls or bears have control of the market.

When volume is considered, an accurate sense of the market's momentum may also be quickly garnered. The Bottom Line Force index is an indicator that can be further refined, according to whether a trader wishes to adopt a short-term or a longer-term perspective. The two-day EMA of force index mentioned above supports a whole host of additional trading rules that offer precise trend indicators for exact trading situations.

On an intermediate basis, a day EMA of force index can point to the likelihood of sustained rallies or longer-term market declines, thereby generating trading rules for longer-term decision making. The SMA assigns equal weights to each price point in the group.

When we compute a day WMA, we assign varying weights to each price points. The latest price, i. This sum is then divided by the sum of the weights used. Then we calculate the multiplier, and thereafter to compute the second EMA value we use the multiplier and the previous day EMA.

This formula is used to compute the subsequent EMA values. The moving average tells whether a trend has begun, ended or reversed. The averaging of the prices produces a smoother line which makes it easier to identify the underlying trend.

However, the moving average lags the market action. A shorter moving average is more sensitive than a longer moving average. However, it is prone to generate false trading signals. Using a single Moving Average — A single moving average can be used to generate trade signals.

When the closing price moves above the moving average, a buy signal is generated and vice versa. When using a single moving average one should select the averaging period in such a way that it is sensitive in generating trading signals and at the same time insensitive in giving out false signals.

Using two Moving Averages — Using a single moving average can be disadvantageous. Hence many traders use two moving averages to generate signals. In this case, a buy signal is generated when the shorter average crosses above the longer average. Similarly, a sell is generated when the shorter crosses below the longer average.

Using two moving averages reduces the false signals which are more likely when using a single moving average. Traders also use three moving averages, like the 5, 10, and day moving average system widely used in the commodity markets.

The indicator fluctuates around the zero line. One can compute ROC based on different periods in order to gauge the short-term momentum or the long-term momentum. The concept of Bollinger bands was developed by John Bollinger. Bollinger bands expand and contract based on the volatility.

During a period of rising volatility, the bands widen, and they contract as the volatility decreases. Prices are considered to be relatively high when they move above the upper band and relatively low when they go below the lower band.

To use Bollinger bands for generating signals, a simple approach would be to use the upper and the lower bands as the price targets. If the price bounces off the lower band and crosses the moving average line, the upper band becomes the upper price target. In the case of a crossing of the price below the moving average line, the lower band becomes the downside target price. In the code below we rolling function to create the Bollinger band function. The mean and the standard deviation methods are used to compute these respective metrics using the close price.

Once we have computed the mean and the standard deviation, we compute the upper Bollinger band and the lower Bollinger band.