am trying to draw short horizontal lines that form part of a 'cross' on charts using the OBJ_TREND function.
void DrawLines(double price, int tf, color col)
datetime time_zero = iTime(NULL,tf,bar); //bar is global
int barshift_zero = iBarShift(NULL,0,time_zero);
datetime time_shift_minus = Time[barshift_zero + 20]; //add 20 bars to create line length to the left of centre of cross
datetime time_shift_plus = (time_zero+(time_zero - time_shift_minus)); //create line length to right of centre of cross
This code creates this:
I have left out the code to draw the vertical part of the cross for ease. You can see that the line to the right of centre is not the same length as the line to the left due to 'Weekend' time bars - i.e the scale is not linear!!!!
This is on the 4 hour chart. If the 30M chart is chosen there is no problem because the scale becomes more linear relative to the time being added to create the new line (although this also could be better - see below).
I know I can convert Price/Time to X,Y coords but as far as I understand there is no function to draw a short horizontal line using only coordinates.
Any ideas please?
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
S2 Trend At Wavelet is designed to eliminate the noises on the Price Chart. A clear picture of the market flow will be seen due to the elimination of the unnecessary variations on the chart.
Capabilities of S2 Trend:
Chart End could be shifted to any desired point by Market End Line; A desired Scale could be used by selecting Scale Menu and the result will be shown on the chart; A separate diagram on the Main Chart could be shown by using Chart window's check box; Graphical representation
Easy Order is an Expert Advisor allowing you to enter any type of trade with one click based on your RISK preferences.
You can choose to enter a trade and automatically calculate your lot size based on how much of your account you want to risk. Risk is calculated based on your Stop Loss placement. You can use a fixed lot size if you don't want to use risk based calculation of lot size. Your previous setting of risk based or fixed lot size remains saved for your next use of this Expert Advi
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 panel is designed for quick and easy one-click trading. All you need to do is to set up all the necessary parameters and enjoy trading! It supports two languages: English and Russian.
The panel consists of four parts:
1. Trade Window
Standard trading operations are conducted from this window: opening buy and sell trades. A trade is opened for he current symbol.
TakeProfit, StopLoss and Trailing stop can be set for each trade. To do this, mark an appropriate item. The values are entere
FULL Automatic is a fully autonomous trading robot for MetaТrader 5 without configurable parameters.
It is similar to SAFE Automatic robot intended for traders having no knowledge of trading basics. It works in Low, Medium, High and Extremal trading modes.
The EA applies modified versions of well-known strategies, including Elliott waves, following a trend, half-pyramiding, scalping, speculative trading with a double deposit protection. The EA switches the strategies automati
News Loader Pro is a tool that automatically updates every economic news in real time with detailed information from several online data sources. It uses the unique technology to load data with full details from popular Forex websites. An alert will be sent to your mobile/email before an upcoming news release. Moreover, it also marks the news release points on the chart for further review and research.
In Forex trading, news is one of the important factors that move
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
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
Veno EA MT5 is a safe and fully automated medium-term trading robot.
The EA does NOT use hedging, martingale, grid strategies, arbitrage, etc.
Veno Expert System MT5 automatically monitors the appearance of participants with distinct preference towards buying or selling on the market. Trades are conducted on sharp cluster and news based movements of the market. The robot analyzes the market volumes and volatility, and follows strong supply and demand movements. It smoothly sets breakeven level
IceFX VelocityMeter Mini is a very unique indicator on MetaTrader 4 platform which measures the speed of the Forex market. It is not a normal volume or other measurement indicator because IceFX VelocityMeter Mini is capable to understand market speed movements which are hidden in ticks and those valuable information cannot be read in an ordinary way from the candles.
The software monitors the received ticks (frequency, magnitude of change) within a specified time range, analyzes these info and
This indicator tries to forecast possible moving of the symbol with NN algorithm. NN algorithm (generally) is easy to understand, and it works with incredible high efficiency in real world. NN belongs to the best data mining solutions, however that's non-parametric algorithm. However please remember this indicator only tries to predict but it doesn't know the future and the prediction can work in short term only.
Basic theory behind the indicator is that the history always repeats in the market
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, and, as a consequence, tick volume is smaller.
In this case, when big amount of requests appear on the market, price changes happen more often. Big tick volume appears. Tick volume is an important indicator of trad
Ability to select any pivot type e.g. Classic, Camarilla, Fibonacci and Woodies. Demark pivot is built in with each pivot type showing the distance between Demark Pivot Lines by a vertical line. Ability to select the period e.g. Daily Pivot, Weekly Pivot and Monthly Pivot. You can insert all three pivots on the same chart. Ability to shift time in hours both in minus and plus from broker server time. Ability to hide/show connecting lines between each day/week/month. Ability to
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
Trade Controller provides multiple methods to protect and maximize your profits. This powerful weapon helps you to set the protect and trailing-stop rules on your trade automatically in many effective methods. Once it is set and turned on, you don't need to monitor your orders anymore, the software will keep watching and control your orders with your predefined rules.
It's designed to support multi-protection and trailing strategy: Protect by break-even, protect by percentage, protect by pip, p
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 th
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 EASIEST way to manage your risk for each trade!
Add the indicator to your chart, configure a risk percentage (of account equity) Enter the number of pips for your stop loss into the text entry field that appears on the chart The position size to take will automatically be updatedThe product features two modes - a compact mode which allows entry of stop loss pips and shows the resulting lot size based on the percent risk setting, as well as an expanded mode that also shows
Three variables are available for every strategy, any one of them can be disabled, their period can be changed.
type_order=ORDER_FILLING _FOK - order filling type.
ReverseTrade=false — trades opens in reverse direction if true. ExitOnBar=true — trades close on each bar only. spreadcover=false — Spread you pay includes in profit trades. It's like trade with zero spread but you should remember that it can decrease exact match between tester's result and live one. It
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
This indicator shows how much time is left on the current candle.
You have absolute control over appearance of remaining time label. Also, you can set additional flag to show remaining time in the comment section of your chart and how much time has already passed on the current candle measured in percents.
This software has no equals in the world and represents a universal trade "console" covering trading signals, automated market entry, setting of Stop Loss and Take Profit, as well as Trailing Profit for multiple trades at the same time in a single open window. Intuitive control of the Expert Advisor in "three clicks" ensures a comprehensive use of all its functions on different computers, including tablets PCs.
Interacting with additional signal indicators that mark the chart to give a real mar
FXG_Info – the most important data in one place.
MetaTrader 5 Indicator FXG_Info provides basic statistical information about a particular currency pair. So that in combination with a chart representing currency price it is easy to determine whether the current situation is good for trading. And when you open a position it will clearly show you the current data such as SL, TP, RR. You are not limited to currency. You can use any market which is provided by you broker.
The following information
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
Linear Regressions Convergence Divergence is an oscillator indicator of a directional movement plotted as a difference of two linear regressions with lesser and greater periods. This is a further development of the ideas implemented in the standard MACD oscillator. It has a number of advantages due to the use of linear regressions instead of moving averages. The indicator is displayed in a separate window as a histogram. The signal line is a simple average of the histogram.
The histogram value
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 based on the comparison of the correlation of trading instruments following an original algorithm. It determines the difference between correlated contracts (delta). The greater the difference, the more it is likely that this Delta will return to zero.
More suited to the FORTS market.
The greater the deviation from zero, the more it is likely that the price will return to zero. Also, the indicator divergence can be applied by comparing highs and lows.
Monitoring and Trend Analysis
This product shows the trend strength levels based on 16 standard indicators, time periods and currency groups.
Depending on the current trend, the indicator colors change from green to red, allowing you to see the full picture.
Whatever your trading method and strategy are, you should always know, in which direction you are trading and what the probability of the trend change is. This indicator will help you answer these questions by calculating the
The Trade Manager Pro EA is a MetaTrader Expert Advisor that performs position management for you avoiding human errors and enhancing your trading activity.
Amazingly easy to use Trade easily from the chart Trade with precise risk management, hassle free Capital preservation is top priority Let profits run without your attention Enjoy risk-free trades as soon as possible Automatic trailing stops for all opened trades Initial stop losses are placed as soon as trades are
hmm - you just have to calculate the middle of the cross correctly:
int idxMiddle = (idxBarEndOfHorLine+idxBegOfHorLine)/2 // => find a solution for 0.5 outcomes
datetime tmeMiddle = Time[idxMiddle];
This is my fault for not explaining fully and putting in full code but the centre of the cross is the first point calculated - this is the key Time/Date point - the lines are just for show and emphasis. The vertical line is easy and consistent because the time scale is linear. My code above calculates a 20 bar (random) time span to the left and adds the same time span (in seconds) to form the right hand side of the cross. It's very frustrating that MQL cannot just use the OBJ_HLINE function properly which of course has a time/price variable input but makes no difference and draws the line across the whole chart!!
Anyway, the reason it doesn't work with the code I am using is because the bars are drawn as 4 hours bars but at weekends there is a 2 day gap between bars.
".. 4 hours bars but at weekends there is a 2 day gap between bars" - that bars don't have a weekend gap!
why do you
1) add 20 bars (to the left) but
2) do not subtract 20 bars for the other side (right)?
that would give you 20 Bars to the left and 20 to the right?
datetime time_shift_minus = Time[barshift_zero - 20];
This does not work if the line projects beyond Time - you get an error "array out of range" because you cannot have Time[-1].
The 20 bars is arbitrary it can be anything depending on how long you want the line to be. I work out the line length to the left in seconds (difference in time between centre of cross and 20 bars away) and add the same amount of seconds to the right side. Bars do have a weekend gap! Use your cursor and move through a range and you will see at some stage the day will jump by 2 days i.e from Friday to Sunday night when the market opens.
You have to reset the 2nd time value at every new bar
Use iBarShift to find the center of the cross
if you find that eg. 15 bars have been drawn to the left of the current bar, you then know that another 5 need to be drawn.
So you set the 2nd time value as Time + 5*PeriodSeconds()
Edit: you can reduce the checking by restricting it to when Bar  is a Sunday/Monday and Bar is a Friday
It' useful to know there is a PeriodSeconds() function I don't think this was available previously! (old MT4).
I'm not sure you are completely correct but you have given me an idea which I will need to try. We have to ignore the fact that I have drawn a 'cross' - as I mentioned it is just for emphasis and in fact forget completely about the vertical line.
The starting point is literally a 'point' i.e Time/1.1234 (time/price coordinate). The challenge is to draw a short horizontal line that extends either side of that point equally for all timeframes (for aesthetic effect).
If you count 'X' seconds to the left even using PeriodSeconds() all it does is convert 'X' Bars to seconds. If there is a weekend in the time span being calculated but there isn't on the right hand side of the starting point the whole thing becomes
non-linear. i.e the line will be longer on the right because the 'seconds' are not being chewed up by a 'weekend'.
I think I understand what you are saying which is to check how many weekends (weekend Bars) there are either side of the starting point and compensate accordingly. This might work but is a real drag for just drawing a line!!
Why isn't there a function that allows you to draw a line like this using coordinates? Completely independent of time?
"Why isn't there a function that allows you to draw a line like this using coordinates? Completely independent of time? "
Draw a rectangle label just a few pixels wide.
good idea, might do that! I still have to ask the question why MQL can't do this but for just a simple line?
Why isn't there a function that allows you to draw a line like this using coordinates? Completely independent of time?
//| Script program start function |