Hello guys, im doing this to learn and code an indicator that i want, im a newbie and im doing what i can to learn this..
Well, my problem in this code is i want to put an arrow after a touch in the rectangle, but the arrow appears everywhere. The arrow is just to see if i done the right thing..
My definition of a touch is, in this case i was looking at a resistance perspective, if the High enter in the area between xkl1 and xkl2 and close bellow xkl2 it would be a touch. Dont matter how many candles it takes to close bellow the area, the main thing is to not close above xkl1... In the second loop i use the number 25 as a limit just because it was just faster for me then search the bar index, because i dont know how do it properly i try it with iBarshift but doesnt work how i though it was.
Thanks for your time and patience, sorry about my poor english.
//| qtest.mq4 |
//| Copyright 2015, MetaQuotes Software Corp. |
//| https://www.mql5.com |
#property copyright "Copyright 2015, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
#property indicator_buffers 1
#property indicator_color1 Red
#property indicator_width1 2
//| Custom indicator initialization function |
//--- indicator buffers mapping
//| Custom indicator iteration function |
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time,
const double &open,
const double &high,
const double &low,
const double &close,
const long &tick_volume,
const long &volume,
const int &spread)
for(i=0; i < limit; i++)
double xkl2= ObjectGet("Box",OBJPROP_PRICE2);
for (int j=0; j<25; j++)
if((High[j+1]>xkl2 && High[j+1] < xkl1) && Close[j] < xkl2)
//--- return value of prev_calculated for next call
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
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
This is a panel for controlling the profit/loss in dollars, pips or % of balance. The panel can be used as a virtual Stop Loss or Take Profit. It also features the emergency button CLOSE ALL.
Other versions in this collection:
VirtualTradePad PositionsStyle VirtualTradePad Ordersstyle VirtualTradePad SignalsStyle VirtualTradePad Lite demo version Digit Market Time Pad Market Time Pad Scalper PadMain Features:
The panel can work only on its own symbol (Current Symbol) or consider the
This is a convenient tool for measuring the number of points between prices. It support magnetizing to OHLC prices. Calculates profit considering specified lot size and spread (optionally). It counts the number of bars between specified point and the time difference between them. Calculates the slope angle from the horizontal position. Unneeded parameters can be hidden. It does not occupy much space when inactive.
Once you add the indicator on the chart, Ruler caption will appear (according 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 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
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
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:
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
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
Robust median renko style indicator for creating custom charts resembling median renko, mean renko, turbo renko and better renko candles as well as vanilla renko with wicks plus PointO charts. This all in one package provides all of the signals needed by day traders, scalpers and even long term traders.
Indicator is an overlay on the main chart so it is possible to utilize one click trading and order manipulation directly on the custom charts. Visual order placement is also
This indicator searches for candlestick patterns. Its operation principle is based on Candlestick Charting Explained: Timeless Techniques for Trading Stocks and Futures by Gregory L. Morris.
If a pattern is detected, the indicator displays a message at a bar closure.
This indicator is a complete analog of the Candle Pattern Finder indicator for MetaTrader 4
It recognizes the following patterns: Bullish/Bearish (possible settings in brackets):
Hammer / Shooting Star (with or without confi
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.
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
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
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 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 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
Trade in the opposite directions with HedgeTerminalApi library!
HedgeTerminalApi is a program interface allowing you to use HedgeTerminal virtualization technologies in your robots and scripts. With HedgeTerminalApi, you are able to trade in the opposite directions when two or more trading algorithms occupy opposite positions on a single symbol. The library allows robots to track their positions even if these positions overlap entirely or partially. Moreover, with this library, you are able to
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 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
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
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 EA trades a fast broker against a slow broker.
Open two terminals for the Expert Advisor operation.
The Fast Broker is a quotes source.
The Slow Broker receives quotes and opens positions.
Expert Advisor Settings
Only a few settings matter when configuring the Expert Advisor.
save_quotes — suggests the action mode: false - as a Fast Broker or true - as a Slow Broker. symb_name — instructs the EA to send quotes to other broker for the selected currency pair. SL – sa
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
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
Is position management time consuming? The Trade Manager Pro EA performs an automatic and flawless position management for you, avoiding human errors and enhancing your trading activity. It represents a ten-fold increase in trading productivity!
Capital preservation is top priorityLet profits run without your attentionEnjoy risk-free trades as soon as possibleIt trails the stop-loss automatically
Initial SL and TP are also automatic
The EA performs the following tasks
Pipfinite creates unique, high quality and affordable trading tools.
Our tools may or may not work for you, so we strongly suggest to try the Demo Version for MT4 first. Please test the indicator prior to purchasing to determine if it works for you.
We want your good reviews, so hurry up and test it for free...we hope you will find it useful.
Energy Beam with Swing Control
Strategy: Confirm swing pullback signals Watch Video: (Click Here)Energy Beam with Trend Laser
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.
I am pretty sure that fractals returns either EMPTY_VALUE or a price
either way, double buf will have a value and if(buf) will return true
price is not being updated and is probably EMPTY_VALUE which will take it way off the chart
up is being incremented every tick and will soon be higher than the number of bars on the chart
To check if you have a new upper fractal, you can use something like
Start with something like that to identify the fractals and then build on that.
iFractals returns either 0 or a price
(I only know because I looked at it yesterday)
I stand corrected - I should have checked first.
But what I said about price not being updated stands, i believe
Hello GumRai and honest_knave, thank you guys for helping me, the idea worked out perfectly. In my main code im using MathMax to compare values of the previous fractals, so the code with the rectangles worked great!
thank you guys again!!