I am attempting to use several indicators such as macd, oscillator, etc against other indicators that have hard ranges, such as rsi and have automated trading based on their crossing points (currently only seen visually)
When I start a standard RSI(14) indicator window, and drag a standard MACD Signal Line(12,26,9) onto it, MT4 "rescales, adjusts, reformats" the MACD signal line onto the RSI line. I want to be able to identify these crossing points even though they are totally different #'s. My first thought was to take the MACD signal line and rescale it linearly on a 0-100 scale
Scaled Value = (A-B) * (E-D) / (B-C) + D
Where:A = Value requiring scaling (Current MACD Signal or vMACD)B = From Minimum (MinMACD Signal) (some value around -.0xx)C = From Maximum (MaxMACD Signal) (some value around +.0xx)D = To Minimum (RSI = 0)E = To Maximum (RSI = 100)
Therefore, due to min=0 the equation becomes ((vMACD - MinMACD) * 100)/(MinMACD - MaxMACD)
Where (MinMACD-MaxMACD) = Range of MACD values and 0-100 is the new scale.
As you can see from the attached screenshots, my re-scaling is close, however not exact (which is a requirement for my client) - this is just an example of several indicators that have been combined and visually traded on, but the desire is to automate this trading.
My exact question is when I have an indicator with a fixed range window (0-100, -100-0, etc) and I drag an indicator such as MACD with a moving range, what function/calculation does Metatrader perform to overlay the graphs so I can logically recreate these crossing points in automated trading in my MQL4 code?
I want to automate trading based off of the VISUAL I am seeing in the bottom indicator window (which is just MACD dragged onto RSI), so I need the ACTUAL VALUE numbers to match in my code. (i.e. in the visual the crossing pt may be RSI=68.7 and the MACD Signal may be .00062) I want my code to be able to match that exact same crossing pt so that I have numerically RSI = 68.8 and MACD Signal = 68.7 (Or if I am overcomplicating this, tell me that too!)
This indicator gives full information about the market state: strength and direction of a trend, volatility and price movement channel. It has two graphical components:
Histogram: the size and the color of a bar show the strength and direction of a trend. Positive values show an ascending trend and negative values - a descending trend. Green bar is for up motion, red one - for down motion, and the yellow one means no trend. Signal line is the value of the histogram (you can enable divergence
The Trend Strength is now available for the MetaTrader 5.
This indicator determines the strength of a short-term trend using the tick history that is stores during its operation.
The indicator is based on two principles of trend technical analysis:
The current trend is more likely to continue than change its direction. The trend will move in the same direction until it weakens.The indicator works on the M30, H1, H4 and D1 timeframes.
It is easy to work with this indicator both in manu
Unique "scalping" trend indicator with the feature of multi-layered smoothing of the resulting lines and a wide selection of parameters. It helps determine a probable change in the trend or a correction virtually near the very beginning of the movement. The toggled intersection arrows are fixed and appear at the opening of a new bar, but, with enough experience, it is possible to look for entry opportunities as soon as the indicator lines intersect at the unfinished bar. The signal appearance li
MultiRSI indicator is a combined RSI indicator for several currencies allowing users to analyze their group movement.
Like all indicators of that kind, it helps identify the currency that is currently the most deviated from the market's general movement, as well as the most oversold or overbought currency in the cluster analyzed by RSI oscillator.
For example, the screenshots display the cluster of 7 currencies with Euro as a base one: EURUSD, EURGBP, EURCHF, EURAUD, EURCAD, EURJPY and EURNZD.
Energy line is calculated similar to kinetic energy in physics: E = (mv^2)/2. Tick volumes (money stock) are used as mass, while price rate of change (ROC) is used as velocity.
Energy direction (positive or negative) is defined by ROC direction.
Chaikin Volatility (CHV) indicator is additionally used. Since the volatility starts increasing before the price actually moves, CHV notifies of the increased market activity in advance. Calculations result in the energy release, which usually occurs b
The most profitable trend traders are the ones who know how to recognize not only the market trend, but also the trading opportunities that arise once a trend has been established. The Pz Trend Trading indicator has been designed to profit has much as possible from trends taking place in the maket.
Established trends offer dozens of trading opportunities, but most trend trading indicators neglect them completely, and leave the trader completely uninformed about what the market is doing during a
The script is intended for automatic placing of Buy Stop pending orders, Stop Losses and Take Profits on the user specified levels.
Avoiding unwanted entering a long position in case of false hitting the level as a result of widening of the spread by a dealing center. Avoiding unwanted triggering of a Stop Loss in case a quote pierces a significant level (fractal) without further confirmation with the close price. Setting a necessary virtual order and entering the market in
The indicator is intended for determining the spread and swap size, the distance for setting stop orders and stop losses from the current price allowed and the risk per 1 point in the deposit currency.
The indicator informs a trader about possible additional expenses and profits connected with transferring a position to the next trade session of the financial instrument. It also informs about the spread size and the distance of pending orders, stop loss and trailing from the current price. In a
This Expert Advisor trades news on any timeframe.
The news are downloaded from the Forex Factory website. Make sure to add the URL to the terminal settings.
The EA is launched on a single chart and defines all necessary pairs for trading on its own.
The robot works with pending orders setting two Buy stop and Sell stop orders before a news release.
It determines the time zones of the calendar and terminal automatically. Make sure to add the time.is URL to the terminal settings.
The EA can b
The indicator generates early signals basing on ADX reading data combined with elements of price patterns.
Works on all symbols and timeframes.
The indicator does not redraw its signals. You see the same things on history and in real time.
For better visual perception signals are displayed as arrows (in order not to overload the chart).
The indicator is a complete analogues of the Trend Monitor indicator for MetaTrader 4
The best results are obtained when the indicator works o
Fast Copy MT5 allows to copy trades between different MetaTrader 5 (netting)(hedge) and MetaTrader 4 accounts in any direction and amount, quickly and easily (without loading the system).
Any type of copying is available
MT5 —> MT5 MT5 —> MT4 MT4 —> MT5 MT4 —> MT4
* For any interaction with the MT4, it is necessary to additionally install Fast Copy MT4
One tool for sending and receiving transactions: [master] > [slave] operation mode can be selected in
DCMV Trade Channel Oscillator
The indicator calculates the values of DCMV trade channel oscillator:
Trade channel width. The value of trade channel depends on the trend (it increases at start of the trend and has the maximum values at end of the trend). The value of trade channel decreases at flat movement. The lowest values of channel width indicates the high probability of the very strong price movement.
The +DC line shows the "bulls" power. The -DC line shows the "bears" power. Th
A script for opening a grid of orders
If you need to quickly open several pending orders (Buy Limit, Sell Limit, Buy Stop, Sell Stop) on a certain distance from the current price, this script will do all the routine for you! Allow AutoTrading before running the script.
Run the script on a chart.
Language of messages displayed (EN, RU, DE, FR, ES) - language of the output messages (English, Russian, German, French, Spanish). Price for open - open price. If set to
This is a classical trading strategy, which falls into the category of breakout systems. They form support and resistance levels, which temporarily limit further price movement. When the price breaks down the support level or breaks up the resistance level, there emerges a strong momentum in the breakout direction, which allows to make profit on strong price movements with moderate risk.
To create the strategy, we used historical data with the quality of history of 99.9%.
It uses filtration o
The indicator determines and marks the short-term lows and highs of the market on the chart according to Larry Williams` book "Long-term secrets to short-term trading".
"Any time there is a daily low with higher lows on both sides of it, that low will be a short-term low. We know this because a study of market action will show that prices descended in the low day, then failed to make a new low, and thus turned up, marking that ultimate low as a short-term point. A short-term market high is just
The indicator consists of the two parts – entry system displayed on the chart and currency power analyzer.
The analyzer can take on values from 0 to 3:
the higher the value, the stronger the currency; the smaller the value, the weaker the currency; average values of the indicator suggest that the currency is in flat.Recommendations on usage:
Buy if Trader Dream shows Buy signal and the analyzer shows the currency's strength (the value exceeds 2). Sell if Trader Dream shows Se
Pivot Points MT5 is a universal color multicurrency/multisymbol indicator of the Pivot Points levels systems. You can select one of its three versions: Standard Old, Standard New and Fibo. It plots pivot levels for financial instruments in a separate window.
The system will automatically calculate the Pivot Point on the basis of market data for the previous day (PERIOD_D1) and the system of support and resistance levels, three in each.
A user can choose colors for the indicator lines.
Main Pivots is an indicator which looks for pivots points on preset intervals (days, weeks, months, years, etc.). Then all extreme points are checked for splice and consistent support and resistance lines are formed. These lines are useful for detecting the best pivot points.
It finds a pair of pivot lines for each interval which correspond to Low (support line) and High (resistance line) of the price movement on the interval. Difference between these lines represemt the price movement for the
Safe Automatic is a safe MetaТrader 5 trading robot working autonomously on a VPS server. The good results are achieved on EURUSD.
The EA applies modified versions of a trend-following strategy, half-pyramiding, scalping, Elliott Wave method and speculating trading with a deposit protection. The EA switches the strategies automatically. The program also takes the news calendar into account: the robot does not enter the market in a 10-minute interval before and after a news rel
AIIV EURUSD - Active Index Inflection Values EURUSD
The Indicator Shows:
The intensity and the direction of the movement of USD. The intensity and the direction of the movement of EUR. The inflection value of EURUSD.This indicator allows determining a state of inflection on the market with a delay of one-two candlesticks and a 60% precision (precision depends on the chart timeframe - the higher the timeframe, the more precise is the forecast).
AIIV is a series of indicators of inflection
We present you an effective software solution for arbitrage between brokers.
The Arbitrage on the market became widespread due to decentralization. There are many liquidity providers, whose quotes differ for various reasons. By tracking the dynamics of changes in the quotes of different brokers, it is possible to determine the delayed and leading brokers, thereby predicting the future prices of the delayed broker for a short time. Knowing these prices and using efficient built-in software filte
The PZ Day Trading indicator detects reversals in a zig-zag fashion, without repainting or backpainting. Based on breakouts of variable lengths, the indicator uses only price action to pick trades and reacts to the market very fast. The positional accuracy of its signals offers huge opportunity for profits, easily up to 80% winners.
Amazingly easy to tradeChart statistics will help you to optimize your tradingIt works on every single timeframe without fine tuningThe indicator analyzes its own q
The Expert Advisor implements the classic "triangular arbitrage", which is successfully used by hedge funds.
"Triangular" arbitrage refers to a class of neutral-market strategies, in which the profit or loss of open positions does not depend on the direction of the market movement as a whole.
In order to take profit, the EA exploits a weak spot of market makers - it utilizes the difficulty of balancing cross rates of all currency pairs.
The advantages of the strategy are the following:
Trade Channel Indicator DCMV
The DCMV Indicator calculates the following Channel characteristics:
Channel Bounds (for TP and SL). It's assumed that price will never go outside the channel.Center Line of the Channel.Settlement price (with probability 90% the price will return to this line).Reference line (used for detection of trend).Upper and Lower breakborder. Used for generation of trade signals: channel breakout (trend strategies), false breakouts (flat strategies).Usage:
The indicator pro
The script creates account summary report in a separate window.
The report can be created for all deals and on deals for selected financial instruments.
It is possible to specify a time interval of calculation and save report to htm-file.
The script creates account summary report in a separate window.
The report can be created for all deals and for deals of the selected financial instruments.
It is possible to specify a time interval of calculation and save report to htm-file.
Who will be interested in this product:
those who are used to diversify the portfolio with a large number of pairs. those who work with a large number of orders those who trade news using pending orders (see the "Grid request" tab).The panel is designed to make managing a large number of orders as easy as managing one.
The currency pairs and order types for opening are formed here. The prices and stop levels are set.
User can define the price valu
The indicator is based on the digital window-sinc filter with an excellent frequency division. Due to this property you can get a very smooth indicator line.
The indicator has three lines: the central line indicates the main trend direction and the "fair" price, the other two lines show the price range. When the central line is read, it is recommended to buy from the bottom line and close a position above the central line. When the line is blue, do the opposite - sell from the upper line and cl
The script is intended for automatic placing of Sell Stop pending orders, Stop Losses and Take Profits on the user specified levels. This script is not that useful as "Virtual pending buy stop", since short positions are opened as Bid price crosses the levels. Thus spread widening is not dangerous. Nevertheless, you need to have this script to prevent unwanted hitting of the Stop Loss levels.
Automation of the process of placing the Sell Stop pending orders, Stop Losses and T
The script allows users to easily close positions if their profit/loss reaches or exceeds a value specified in pips.
Please set slippage value first. Sometimes some positions do not close due to high volatility of the market. Please set larger slippage or restart the script.
The TrendX is a technical indicator which allows to determine not only the movement direction of the market, but also to identify the flat areas.
It is based on the CCI indicator and a combination of price patterns.
The indicator works on all symbols and timeframes.
Two parameters allow to customize the indicator as needed, PERIOD is the period of CCI and T_Value is the significance of the trend.
The bottom window is the RSI(14) with a MACD(12,26,9) Signal line drag and dropped in on MT4. The middle window is a result of the linear scaling I performed on the MACD (close, but no cigar) - Please Help! I attached side by side code compares for a simple macd conversion. To clarify, I want to be able to replicate what MT4 does when I drag any Oscillator / MACD / etc onto a fixed scale graph, so that I can trade points I am visually seeing automatically.
Even if you try to put MACD level zero in RSI level 50, it won't makes any sense, because MACD has no tops nor bottoms.
And please show the code using SRC button
#property copyright "Copyright © 2004, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net/"
//---- indicator settings
#property indicator_buffers 2
#property indicator_color1 Orange
#property indicator_color2 Red
#property indicator_width1 2
#property indicator_maximum 100
#property indicator_minimum 0
//---- indicator parameters
extern int FastEMA=12;
extern int SlowEMA=26;
extern int SignalSMA=9;
//---- indicator buffers
// Erroneous values ensure the high and low are made on first attempt, and then updated as they are exceeded accordingly
double signalhigh = -99999999;
double signallow = 99999999;
//| Custom indicator initialization function |
//---- drawing settings
//---- indicator buffers mapping
//---- name for DataWindow and indicator subwindow label
IndicatorShortName("Pauls RSI vs ScaledSignal");
//---- initialization done
//| Moving Averages Convergence/Divergence |
//---- last counted bar will be recounted
//---- macd counted in the 1-st buffer
for(int i=0; i<limit; i++) MacdBuffer[i]=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i)-iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i);
//---- signal line counted in the 2-nd buffer
for(i=0; i<limit; i++)
// Gather the highest Signal Buffer Value
if (SignalBuffer[i] > signalhigh) signalhigh = SignalBuffer[i];
// Gather the lowest Signal Buffer Value
if (SignalBuffer[i] < signallow) signallow = SignalBuffer[i];
// Rescale SignalBuffer to have the lowest SignalBuffer vale = 0 and the Highest Signal Buffer = 100, same scale as RSI
for (i=0; i<limit; i++)
SignalBuffer[i] = (SignalBuffer[i]-signallow)/(signalhigh-signallow)*100;
Also sorry for my previous comment, I was fast read your topic. However my comment did gave me idea, though I don't know if its solve your problem.
Use iRSIOnArray() (https://docs.mql4.com/indicators/iRSIOnArray) and create RSI by using MACD data.
Nope MT is NOT consistent when placing MACD on RSI - just scroll down to historical data, and you will see the value of MACD will go up and down through levels of RSI.
Al right I made error again with my previous idea ;D.
Here's the correct one : MACD is a result of fast MA subtracted by Slow MA. We can attach 2 MAs with different period on a chart, and if we divide them by 2 we have the MACD result on chart.
MACD_on_chart = (Fast MA + Slow MA)/ 2
To make it "synch" with standard RSI, use RSI calculation instead iRSIOnArray (RSI under Custom Indicator in MetaEditor) and calculate that "MACD result on chart" against the slow MACD.
Just attach the MAs and think about it.
I agree it is not consistent with RSI, however it is consistent with zero crossing at 50. And I am more interested in how MT4 takes the data from two different "scales" and drops them on one, as I have several other indicators I need to match EXACTLY to the visual I am seeing for a client who wants to automate his system exactly as the visuals he has manually traded his system to. I assumed I could take the min / max of the signal - divide by 2, and that would be my "50" or zero crossing. Even then I do not see how to create what MT4 automatically does.
Again, I am looking for the exact way MT4 imports MACD/Oscillator/Williams/etc on top of each other, so i can reproduce that data programatically to match the visual information on the indicator chart. The RSI/MACD is irrelevant, just an example in this case. I have many indicators I need to match mathematically, and I am struggling to understand the methodology of MT4's application. I have spoken to the Cyprus office, and they have said they will attempt to support via this thread. however if someone from MT4 would like to speak 1:1, please reach out, as this is a massive project several clients wanting to invest a lot of capital once their manual system has proven to be able to automate.
Hope your client reading this too.
That windows programming you asking.
Here's maybe the solution : Add 2 buffers in MACD which draw none, search the high and the low using WindowsBarPerChart() and WindowsFirstVisibleBar(), and hopefully you get what you looking for.