I have an indicator which compares several values. I which to bring those values into my EA. So far, what I've found, of the use of iCustom function is; calling the name of the indicator and comparing two different time periods of the same MA. How would I use iCustom to compare two different values of the same indicator.
The Expert Advisor uses the strategy of trading the Fibonacci levels. As the basis for placing a grid, the EA uses the ZigZag indicator (included in the standard MetaTrader delivery).
First, the EA determines the trend direction. To do that, according to the Dow theory, it uses the last two Highs and last two Lows of the ZigZag.
If the last High is higher than the previous and the last Low is higher than the previous, the EA considers the trend to be ascending. If the last High is lower
VirtualTradePad - is a contol panel for working with orders in МetaТrader 5 : buy, sell, buystop, buylimit, sellstop, selllimit, close, delete, modify, tralling stop.
VirtualTradePad won 2nd prize in the "Best Control Panel in the MQL5 Language" Contest.
The panel consists of 5 tabs.
VirtualTradePad PositionsStyle VirtualTradePad Ordersstyle VirtualTradePad SignalsStyleDemo version of the panel - VirtualTradePad LiteProfit or Loss PadINFO PadYou can also try this panel for
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
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 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.
This is an extended version of Heiken Ashi indicator with the ability to average (smooth) the values for the specified period of bars and select the applied price: considering "Open price" or not. The description is provided in the parameters. Three screenshots are displayed below: standard version (1 bar), 3 bars and 5 bars.
МetaTrader 4 version: https://www.mql5.com/en/market/product/7326
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 robot does not trade at night from 10 p.m. to 4 a.m. (server time).
The robot was tested in the special tester on real ticks. Empirical e
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
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.
IShift Lite is a lite version of IShift, and it doesn't include the tick chart.
IShift Lite allows:
perform trade operations directly from the depth of market with a "single touch"; automatically place Stop Loss and Take Profit; move position to breakeven; move Stop Loss along the price; automatically calculate the volume of an order depending on a fixed risk level or a fixed margin level.The program includes a visual help system.
Note: the demonstration version downloaded via the "Demo
The indicator plots horizontal support and resistance levels using grouping of extrema. The levels are displayed as lines whose color depends on how many times the level was a support or resistance line over the specified interval. You can also display counters for support, resistance and age of the level in text format. The age of the level indicates how many bars back the level had the most recent impact on the price (on the chart time frame as specified in the settings). Given the age of the
This is an utility for automatic scaling of a chart and making at least 140 bars visible in it. This is necessary for a correct wave analysis according to the Bill Williams' strategy "Trading Chaos". The utility can be used on any timeframe available in МetaТrader 5.
It draws a vertical line through the first bar the calculation starts from. This line allows you to see the probable starting point of the wave sequence along with a sufficient number of bars displayed in the chart. It also makes t
This product is similar to Tick volume analizer Expert Advisor, however it is implemented as an indicator. Release of this product is stipulated by the fact, that it is not possible to run two EAs in the same window.
Tick volume is equal to amount of ticks at the unit of time. There is direct correlation between tick volume and real amount of deals. Every change of the price is a result of a real request to perform a deal. Consequently, fewer requests we have, the less price changes we get, an
ROMAN5 Bollinger Bands TrailingStop includes BreakEven facility. TrailingStop automatically moves the Stop Loss with the Bollinger Bands level. You can place ROMAN5 Bollinger Bands TrailingStop in any chart. It comes with an alert that will sound whenever a new signal appears. It also features an email facility. Your email address and SMTP Server settings should be specified in the settings window of the "Mailbox" tab in your MetaTrader 5.
Bollinger Bands Parameters:
BB Period - The averagin
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
Does not support hedging orders on a single symbol on MT5
MultiMTCopier MT5Receiver - new and improved multi-terminal positions copier for your real/demo account, works faster, requires less, flexible in managing and upgrading, new information support. This Expert Advisor is designed for the MetaTrader 5 terminal, trades will be copied into this terminal.
The EA will copy all positions without delays Additionally integrated notification in situations requiring user attention
The indicator calculates the quantum frequencies using the current market data. The quantum frequencies are used in Spectrum analysis of automated trading systems to create quantum filters for selecting signals, i.e. skipping trades that are likely to be unprofitable.
How It Works
It analyses the trade results of automated trading system for each frequency (512 frequencies are used). Calculation of the frequency response to search for "profitable" and "unprofitable" f
This is a panel for controlling the profit/loss in dollars, pips or % of balance. A new function for trailing profits has been implemented.
The panel can be used as a virtual Stop Loss or Take Profit.
It also features the emergency button - CLOSE ALL.
You can also try the full version of the VirtualTradePad for mt5 panel, as well as the Profit or Loss for mt4 panel
Other versions in this collection:
VirtualTradePad for mt5 Digit Market Time Pad Market Time Pad Scalper PadMain f
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 economic calendar is made in the form of an Expert Advisor that downloads the data from one of the most popular Forex sites (forexfactory.com/calendar.php). The data is presented in two ways. The first (primary) is represented as icons with detailed information about the event. The second is displayed as a line with a news description. Economic Calendar downloads published news in real mode with the possibility to adjust the spacing of data validation and user-friendly customizable graphical
Times & Sales is a famous (and old!) trading tool. However, it is not present in MetaTrader 5 as a built-in tool.
DeltaTrader now presents this indicator for MetaTrader! It has the following characteristics:
Two flag modes: FOREX and EXCHANGE
FOREX: black color: last price = 1-Minute opening price / blue color: last price < 1-Minute opening price / green color: last price > 1-Minute opening price. EXCHANGE: black color: last price = between quotes / blue color: last price = bid price / gre
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
Informer for VPS - report on the state of your account via e-mail. Useful for controlling your Expert Advisors that run on a VPS or a dedicated computer. Information about open positions and last deals for a day, week, month or year grouped by currency pairs.
Adjustable periodicity of reports and depth of deals included in the report. A possibility to add own comment to each report. You will receive reports on e-mail with specified periodicity: from 15 minutes to once a day. The reports are se
Does not support hedging orders on a single symbol on MT5
MultiMTCopier MT5Source - new and improved multi-terminal positions copier for your real / demo account, works faster, requires less, flexible in managing and upgrading, new information support. This expert is designed for terminal MetaTrader5 from which the position will be copied.
The EA will copy all positions without delays Additionally integrated notification in situations requiring user attention Buttons for re
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
Trading Chaos Expert Lite is a light version of Trading Chaos Expert. In the Lite version it is not possible to receive the table of trading signals, automatically place pending orders based on them and maintain open positions for multiple symbols at the same time in one window. Only the Current Chart mode is available. In all other features the panel is fully consistent with the basic version of the Expert Advisor.
This is, rather, a well thought out trader's assistant which is not easy to do
qAutoActivation indicator is one of the main components of Trading Chaos Expert trading expert panel. The indicator displays the current trend on the current timeframe. This is the first indicator that is attached to the chart and saved in the trading complex template. It defines what trading signals from the expert panel should be automated for market entry (bullish or bearish ones).
When the trend changes, the indicator changes the line color and, at the same time, highlights the trading pane
The main purpose of the indicator is to determine and mark trade signals on the histogram of the Accelerator Oscillator, which were described by Bill Williams in his book "New Trading Dimensions". The list of signals:
The buy signal when the indicator histogram is below the zero line. The sell signal when the indicator histogram is below the zero line.The sell signal when the indicator histogram is above the zero line. The buy signal when the indicator histogram is above the zero line. The
Percent Crosshair is a powerful and easy percentage measure tool.
Measure the chart percentage very quick! Don't waste your time anymore!
Just attach the Percent Crosshair indicator in the chart, select crosshair mode at toolbars or press "Ctrl+F" and start using the crosshair as you always do! The percent measure will be next to the indicative price.
Customize your indicator the way you want!
There are 4 entry parameters:
Positive % color: set the desired color when % is positive. Negat
The trade strategy is based on three moving averages. To determine the trend, it uses three exponentially smoothed moving averages: FastEMA, MediumEMA and SlowEMA.
Buy signal: FastEMA>MediumEMA>SlowEMA (upward trend).Sell signal: FastEMA<MediumEMA<SlowEMA (downward trend).Input parameters:
Inp_Signal_ThreeEMA_FastPeriod = 8;Inp_Signal_ThreeEMA_MediumPeriod = 38;Inp_Signal_ThreeEMA_SlowPeriod = 48;Inp_Signal_ThreeEMA_StopLoss = 400;Inp_Signal_ThreeEMA_TakeProfit = 900;Inp_Money
Let's say that I have an MA of the average of the High and Low for a 15 min Period, and a MA of Close Price over 13 Periods, in the same Indicator. Let's say that I want to place a Buy, in my EA, when the MA of the Close Price crosses under the MA of the average of High/ Low, in the Indicator.
How would I utilize the iCustom Function to capture a state which occurs between two different MAs in the same Indicator?
if (MaOfTheClosePreviousBar > MaOfTheAverageHighLowPreviousBar) && (MaOfTheCloseCurrentBar < MaOfTheAverageHighLowCurrentBar
//Loop is Finished
Thanks for the reply!
My question, though, is with reqards to a single Custom Indicator which utilizes several different MAs. I want to compare the relationship of two of the MAs ( even their relationship to a third MA ) for my decisions regarding positioning of Buy and Sell Orders.
How would I utilize the iCustom Function, so that I can call and compare the relationship of two MAs, from within the same Custom Indicator.
Since I can't execute orders from an Custom Indicator, I have to bring these values into an EA.
double MaOfTheClosePreviousBar - Is the name of a value which I'm assigning within my EA.
iCustom(NULL,0,"",0,i+1); - Is the function which calls the Custom Indicator named between the quotes. The remaining values relate to this Indicator.
Calling a Custom Indicator with the iCustom Function is not the problem. The problem is that, when I call the indicator, how do I then call a specific MA or MAs for use within my EA.
If my Custom Indicator only had one MA, I would have no problems.
Do I have to take my Custom Indicator, with several MAs, and convert it to several indicators with one MA?
MA is a technical indicator and can be called by your EA, reading it's index buffers for data.
iCustom() is a command that can be used to access a custom built indicator. That custom indicator can have one or several algorithms contained within it, and the result of those calculations routed to it's index buffers. The iCustom() command can then be used to access the index buffers of your custom indicator. The custom indicator can have multiple MA calculations within it, and each result assigned to any of the eight index buffers a custom indicator can contain, in MQL4.
If you already have the custom indicator built with two or three or more MA's, then you need to know which MA result is assigned to which index buffer. Then use the iCustom() command in your EA to access the index buffers in your custom indicator... addressing the specific index buffer you need to import data from.
Now if you have 3 MA's in your custom indicator, and want to read a single phase from each, then your EA will use 3 iCustom() statements to import data for each phase from it's assigned index buffer. One iCustom() call will not read all three index buffers simultaneously. "For" loops are commonly used to rotate through what may appear to be a single iCustom() call. In actuality the iCustom() statement is being accessed repeatedly, with a value incremented to address the next index buffer... so you could access say... three index buffers with one iCustom() call, but that statement is repeated and updated each pass through the "For" loop in your EA code.
Once the EA has captured the data from the indicator it is accessing, possibly using one or more iCustom() calls, then that data can be compared within the EA code and a buy or sell decision made.
However, if you are building an indicator that contains three MA's, then the comparison can be made in the indicator itself... which is actually better to do for a variety of reasons. In that case, the indicator simply issues a buy or sell signal, using one of it's index buffers, instead of transmitting data for the EA to have to process. Then you can use the custom indicator as a source of a "buy" or "sell" signal, and that is what you will be reading from the index buffers and not MA data.
I think this is what you are asking about... could be wrong, but hope this helps to clear things up for you.
Thanks for the help! Getting closer! Something seems to be missing, or I'm not quit doing it right. Am able to capture first MA but getting value of 0 for second.
Val1 = iCustom(NULL,0,"First_MA",13,3,0);
Val2 = iCustom(NULL,0,"Second_MA",0,6,0);
11:19:39 Test iCustom EURUSD,M1: Val1 = 30.11376832 : Val2 = 0.00000000
If I set Val1 at 0 for period I get: Val1 = 0.00000000 : Va2 = 0.00000000
But, no matter what value I set Val2 for period I get " Val2 = 0.00000000 "
Check to see if you actually have indicators with the file names "First_MA" and "Second_MA"... if that is the case, then
check to be sure that for "First_MA.mq4" that index buffer 3 is the correct buffer for reading it's MA data, and that for "Second_MA.mq4" that index buffer 6 is the correct buffer for reading it's MA data.
In the iCustom() statement... the actual filename minus the suffix ".mq4" as you appear to have done correctly needs to be contained in the statement. If it doesn't have the exact filename(s), then it can't find the indicator file(s) that you are referencing.
What you are showing me is that you are using two different MA indicators, named "First_MA" and "Second_MA". You are reading index buffer 3 for the "First_MA" indicator, and index buffer 6 for the "Second_MA" indicator. You are reading bar 0 for both as well, and this all looks okay so far....
If everything is okay so far, then there is one more thing that you have to consider... an iCustom() statement also has to contain each external variable for the indicator you are attempting to read, in the same order as they are stated in the indicator. You show a single external value of 13 for "First_MA" and 0 for "Second_MA". This seems wrong to me. Because most MA's have more than one external variable... ie int period, int ma_shift, int ma_method, int applied_price... so, if your MA indicators have these or other external variables, then they need to be included in the iCustom() statements used to read those indicators, before you will actually read any valid data from them.
If you have any problems understanding this, then just post the code for the external variables for the MA indicators you are using, and I will put up an example of an iCustom() statement for you to read those MA's, okay?
(just copy the external variables from the .mq4 files for your indicators, and paste them here in the forum... You don't need to copy the whole indicator code)
Hope this helps.
There is a more recent thread all about iCustom . . . instead you dredge up a 4 year old thread, why ?
Thread start date: 2009.12.10
I think threads that are more than 1yr old should have a different color icon in the topic list.