I wonder that how can I do explained below.
For example, if RSI > 50, MACD cross upward if its value below 0 and lastly CCI just cross over -100 for buy signal. Also, for second trade, all of them should turn to their default levels as the initial period of the first order(RSI should go below 50 and then again take buy signal if it cross 50 upwards, CCI should go below -100 and waiting a new cross)
Actually I wrote the conditions but, I couldn't code the condition they should turn to their default positions for buy signal.
Thank you for your interest,
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
Exp COPYLOT CLIENT for MT5 is a copier for the МetaТrader 5 platform. It copies forex trades from any accounts. Including those from terminals МТ5 and МТ4.
Install the Expert Advisor in the terminal where you want to copy trades. Specify any text label name as pathRead, for example, "COPY". This should match the master terminal (to bind the two terminals). To copy trades, you need to install the free Master copier in the terminal from where you want to copy the trades: COPYLOT
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
Scalper with Automatic Parameter Setting
Would you like to have an Expert Advisor that could automatically calculate trade parameters and adjust to the current market situation?
We present you our new development for the Forex market. This is a tick scalper for МТ4 and МТ5 - TickSniper.
Trading with it is fully automated. Forget continuous monitoring - this Expert Advisor trades independently. Its settings have been optimized over the course of testing on our real accounts.
The indicator has standard settings. The new modification of indicator provides special marking of the segment when the moving averages begin to form a cross in one direction or another. The Alligator`s cross indicates that the trend is about to change. Modified Alligator helps traders to determine a trend on a particular timeframe even if the averages are intertwined and have a shift in the future. Direction of a trend is determined by a cross of the averages with a specified marking area on th
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
PipTick VSA is based on the original Volume Spread Analysis method. It was designed for quick and easy recognition of VSA patterns. Even though this indicator looks very simple, it is the most sophisticated tool that we've ever made. PipTick VSA indicator is a really powerful analytical tool that generates very reliable trading signals. Because it is very user friendly and understandable, it is suitable for every type of trader, regardless of his experience.
What is VSA?
VSA - Volume Spread An
This indicator allows you to enjoy the two most popular products for analyzing request volumes and market deals at a favorable price:
Actual Depth of Market Chart Actual Tick Footprint Volume ChartThis product combines the power of both indicators and is provided as a single file.
The functionality of Actual COMBO Depth of Market AND Tick Volume Chart is fully identical to the original indicators. You will enjoy the power of these two products combined into the single super-indicator!
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
Active Lines - a powerful professional tool for operations with lines on charts. Active Lines provides a wide range of actions for events when the price crosses lines. For example: notify, open/modify/close a position, place/remove pending orders. With Active Lines you can assign several tasks to one line, for each of which you can set individual trigger conditions, as well as conditions for re-activations and the number of possible activations.
Active Lines helps you easily organize various tr
The main purpose of the indicator is to detect and mark trade signals on the histogram of the Awesome Oscillator according to the strategies "Trading Chaos, second edition" and "New Trading Dimensions".
The indicator detects and marks the following trade signals:
"Two peaks" - Divergence. The signal "Second wise-man" - third consequent bar of the Awesome Oscillator after its color is changed. The histogram crosses the zero line. The signal "Saucer".The indicator includes a signal block th
Purpose and functions of the indicator
The indicator determines and marks the moments of trend change on a chart based on the theory of fractal levels breakdown on any time frames. If a breakdown based on all rules is real, the horizontal lines will appear on the chart with corresponding color. If there is an up trend, the line will be blue. In the descending trend the line will be red. The blue line is a strong support level, the trader should look for buying opportunities above this line. The
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
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
The fractal analysis of the markets is used in the indicator operation algorithm. According to the fractals theory, after the breakthrough of the fractal level confirmed by the closing price located below or above the fractal, the trend wave in the direction of the breakthrough starts to develop. Until the fractal has been passed in the opposite direction, the trend is considered to be acting even if the price is flat or moves backwards. If a bullish fractal has been previously broken through on
Smart Trend Line Alert, a professional Trend Line, Support Line and Resistance Line Alert
Auto and Click mode for converting any new drawn line into an alert line (Trend line or Horizontal line); Separating different time frame's lines by hiding drawn lines from lower time frames in higher time frames to avoid being confused by many lines on the chart from different time frames; Auto switch time frame when a line was hit in the lower time frame; Auto flatten horizontal lines
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
SafeZone is a method for setting stops on the basis of recent volatility, outside the level of market noise. It is described in "Come into my Trading Room" book.
In a downtrend, SafeZone defines noise as the portion of the current bar that extends above the high of the previous bar, against the downtrend. It averages the noise level over a period of time and multiplies it by a trader-selected factor.
For short trades, it adds the average noise level, multiplied by a factor, to the latest hig
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
This is Gekko's Cutomized Moving Average Convergence/Divergence (MACD), a customized version of the famous MACD indicator. Use the regular MACD and take advantage of several entry signals calculations and different ways of being alerted whenever there is potential entry point.
Fast MA Period: Period for the MACD's Fast Moving Average (default 12); Slow MA Period: Period for the MACD's Slow Moving Average (default 26); Signal Average Offset Period: Period for
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
FourAverage: A Breakthrough in Trend Identification
With evolving information technology and increasing number of market participants, financial markets get less and less analyzable using good old indicators. Common technical analysis tools, such as Moving Average or Stochastic alone, are not capable of identifying the trend direction or reversal.
Can a single indicator show the right direction of the future price, without changing its parameters over 14 years' history, while at the same time
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
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.
Trend Laser with Volt Impulse
Strategy: Confirm impulsive signals Watch Video: (Click Here)Trend Laser with Energy Beam
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
The Expert Advisor implements the classic "triangular arbitrage", which is successfully used by hedge funds.
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 combining cross rates of individual currency pairs.
The advantages of the strategy are the following:
Cluster analysis is now available in MetaTrader 5!
YuСlusters indicator builds a cluster graph based on tick data. For exchange instruments it is the volume and the last deal price, for Forex instruments it is the real or tick volume (depends on broker) and selectable type of the current price: Bid, Ask or (Bid+Ask)/2.
There are 5 criteria of cluster generation: Time interval, the criterion is set in seconds. Price range, the criterion is set in points. The current cluster is closed when the
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
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.
Please show your relevant codes.
#property copyright "Copyright 2014, BarisYalcinkaya."
#property link "https://www.mql4.com"
#property version "1.00"
extern double StopLoss_Pips = 9;
//extern double TakeProfit_Pips = 36;
extern double RiskPercent = 3;
extern double Reward_Ratio = 1.5;
extern int RSI_Period_W = 14;
extern int SMA_Period_D = 200;
extern int MACD_Fast_D = 26;
extern int MACD_Slow_D = 12;
extern int MACD_Shift_D = 9;
extern int ADX_Period_D = 14;
extern int CCI_Period_D = 14;
extern int RSI_Period_D = 14;
extern int MACD_Fast_H4 = 26;
extern int MACD_Slow_H4 = 12;
extern int MACD_Shift_H4 = 9;
extern int ADX_Period_H4 = 14;
extern int CCI_Period_H4 = 14;
extern int RSI_Period_H4 = 14;
double ticksize = MarketInfo(Symbol(), MODE_TICKSIZE);
if(ticksize == 0.00001 || ticksize == 0.001)
pips = ticksize*10;
else pips = ticksize;
//Rule_0(Weekly) BUY Variables
//Rule_1(Daily) BUY Variables
double CCI_Current_D, CCI_Previous_D;
double MACD_CurMain_D, MACD_CurSignal_D, MACD_PrevMain_D, MACD_PrevSignal_D;
//Rule_2(4Hours) BUY Variables
double MACD_CurMain_H4, MACD_CurSignal_H4, MACD_PrevMain_H4, MACD_PrevSignal_H4;
double CCI_Current_H4, CCI_Previous_H4;
bool BuyRule_D_SMA, BuyRule_D_MACD, BuyRule_D_RSI, BuyRule_D_DI, BuyRule_D_CCI;
bool BuyRule_H4_MACD, BuyRule_H4_RSI, BuyRule_H4_DI, BuyRule_H4_CCI;
bool SellRule_D_SMA, SellRule_D_MACD, SellRule_D_RSI, SellRule_D_DI, SellRule_D_CCI;
bool SellRule_H4_MACD, SellRule_H4_RSI, SellRule_H4_DI, SellRule_H4_CCI;
// For loop
int cnt, ticket, total;
Print("Bars less than 100");
//DI+ and DI- Daily
//DI+ and DI- H4
//Rules Weekly Options
BuyRule_W_RSI = (RSI_W>50);
//Rules Daily Options
BuyRule_D_SMA = (SMA_D>200);
BuyRule_D_MACD = ((MACD_CurMain_D>MACD_CurSignal_D) && (MACD_PrevMain_D<MACD_PrevSignal_D));
BuyRule_D_RSI = (RSI_D>50);
BuyRule_D_DI = (DIplus_D>DIminus_D);
BuyRule_D_CCI = ((CCI_Previous_D<CCI_Current_D)&&(CCI_Current_D<-100));
//Rules H4 Options
BuyRule_H4_MACD = ((MACD_CurMain_H4>MACD_CurSignal_H4) && (MACD_PrevMain_H4<MACD_PrevSignal_H4));
BuyRule_H4_RSI = (RSI_H4>50);
BuyRule_H4_DI = (DIplus_H4>DIminus_H4);
BuyRule_H4_CCI = ((CCI_Previous_H4<CCI_Current_H4)&&(CCI_Current_H4<-100));
//Rules Weekly Options
SellRule_W_RSI = (RSI_W<50);
//Rules Daily Options
SellRule_D_SMA = (SMA_D<200);
SellRule_D_MACD = ((MACD_CurMain_D<MACD_CurSignal_D) && (MACD_PrevMain_D>MACD_PrevSignal_D));
SellRule_D_RSI = (RSI_D<50);
SellRule_D_DI = (DIplus_D<DIminus_D);
SellRule_D_CCI = ((CCI_Previous_D>CCI_Current_D)&&(CCI_Current_D>100));
//Rules H4 Options
SellRule_H4_MACD = ((MACD_CurMain_H4<MACD_CurSignal_H4) && (MACD_PrevMain_H4>MACD_PrevSignal_H4));
SellRule_H4_RSI = (RSI_H4<50);
SellRule_H4_DI = (DIplus_H4<DIminus_H4);
SellRule_H4_CCI = ((CCI_Previous_H4>CCI_Current_H4)&&(CCI_Current_H4>100));
//Order Opening --------
//Checking buy possibility
if((BuyRule_D_MACD && BuyRule_D_RSI)||(BuyRule_D_MACD && BuyRule_D_DI)||(BuyRule_D_MACD && BuyRule_D_CCI)||
(BuyRule_D_RSI && BuyRule_D_DI) ||(BuyRule_D_RSI && BuyRule_D_CCI)||(BuyRule_D_DI && BuyRule_D_CCI))
if((BuyRule_H4_MACD && BuyRule_H4_RSI)||(BuyRule_H4_MACD && BuyRule_H4_DI)||
(BuyRule_H4_MACD && BuyRule_H4_CCI)||(BuyRule_H4_RSI && BuyRule_H4_DI)||
(BuyRule_H4_RSI && BuyRule_H4_CCI) ||(BuyRule_H4_DI && BuyRule_H4_CCI))
double LotSize_Buy = 0;
double Equity_Buy = AccountEquity();
double RiskedAmount_Buy = Equity_Buy*RiskPercent*0.01;
double SL_Buy = Low-StopLoss_Pips*pips;
double SL_Buy_Loss = Bid - SL_Buy;
double TP_Buy = Bid + (SL_Buy_Loss*Reward_Ratio);
LotSize_Buy = (RiskedAmount_Buy/(SL_Buy_Loss/pips))/10;
Comment("BUY order opened : ",OrderOpenPrice());
else Comment("Error opening BUY order : ",GetLastError());
} // H4_Indicators Buy
// } // D_Indicators Buy
// } // D_SMI Buy
} // W_RSI Buy
//Checking Sell Posibility
if((SellRule_D_MACD && SellRule_D_RSI)||(SellRule_D_MACD && SellRule_D_DI)||(SellRule_D_MACD && SellRule_D_CCI)||
(SellRule_D_RSI && SellRule_D_DI) ||(SellRule_D_RSI && SellRule_D_CCI)||
(SellRule_D_DI && SellRule_D_CCI))
if((SellRule_H4_MACD && SellRule_H4_RSI)||(SellRule_H4_MACD && SellRule_H4_DI)||(SellRule_H4_MACD && SellRule_H4_CCI)||
(SellRule_H4_RSI && SellRule_H4_DI) ||(SellRule_H4_RSI && SellRule_H4_CCI)||
(SellRule_H4_DI && SellRule_H4_CCI))
double LotSize_Sell = 0;
double Equity_Sell = AccountEquity();
double RiskedAmount_Sell = Equity_Sell*RiskPercent*0.01;
double SL_Sell = High + StopLoss_Pips*pips;
double SL_Sell_Loss = SL_Sell - Ask;
double TP_Sell = Ask - (SL_Sell_Loss*Reward_Ratio);
LotSize_Sell = (RiskedAmount_Sell/(SL_Sell_Loss/pips))/10;
} // H4_Indicators Sell
} // D_Indicators Sell
} // D_SMA Sell
} // W_RSI Sell
} // IsNewCandle
} // total
} // Start()
static int BarsOnChart = 0;
if(Bars == BarsOnChart)
BarsOnChart = Bars;
It' looking 3 different timeframes.
First rule is: Weekly=RSI > 50,
Second rule is: if (Daily Price > MVA 200) check the other conditions.
If any of the following 2 triggers happened(Daily):
a)Daily=RSI > 50
b)Daily=MACD ShortEMA Cross over Long EMA (below the 0 level)
d)Daily=CCI JustCrossOver -100
If any of the following 2 triggers happened(4Hour):
a)4Hour=RSI > 50
b)4Hour=MACD ShortEMA Cross over Long EMA (below the 0 level)
d)4Hour=CCI > -100
I defined all of them however I can't create a condition for the second trade which should be opened. For example, if RSI firstly go down to 50 and then waiting a upward cross, MACD should go below 0 and then waiting another signal which is based on crossing main line and its signal line, and lastly DI+ should go back below the DI- and then cross it upwards second time.
I add a picture which maybe explain it better.
Thank you for your interest,
Trading functions can be used in Expert Advisors and scripts.
Trading functions of OrderSend(), OrderClose(), OrderCloseBy(), OrderDelete(), and OrderModify() cannot be called from custom
bool StatusRsi, RsiCrossed, StatusMACD, CrossingMainTheSignal, DIPlusBelowDIMinus, DIPlusAboveDIMinus, ConditionToOpenTrade;
if (RSI < 50)
StatusRsi = true;
if (StatusRsi && RSI > 50)
RsiCrossed = true;
if (MACD < 0)
StatusMACD = true;
if (StatusMACD && MACD > 0)
CrossingMainTheSignal == true;
if (DI+ < DI-)
DIPlusBelowDIMinus == true;
if (DIPlusBelowDIMinus && DI+ > DI-)
DIPlusAboveDIMinus == true
if (RsiCrossed && CrossingMainTheSignal && DIPlusAboveDIMinus)
ConditionToOpenTrade = true;