I have this EA for MT3 and its simple design is to place 2 orders BUYSTOP and SELLSTOP.
Now its price is calculated from the previous bar info. The pivot value is generated and then add +17 for BUY and -13 for sell off that pivot value. If trade is executed then it should close at end of bar. If not then both are deleted at end of bar. Then it does the whole thing again.
I would use a breakeven to 0 after 10pips
Could someone take a look at this EA to make some changes to do this.
Name := BARTRADER
Author := FAB4X
Link := http://www.FAB4X.com
Notes := Use on 15 or 30m charts
Lots := 1.00
Stop Loss := 45
Take Profit := 25
Trailing Stop := 0
// Exit if not H4 charts
if Period != 240 then
Comment("This expert is for 4HR Charts");
// Exit if time between EA runs is less than 5 sec.
if Curtime - LastTradeTime < 5 then exit;
// Set if back tester earlier than 2005
If TimeYear(time)<2005 then Exit;
// Set Variables
Slippage = Slippage*Point;
Pivot = ( myh+myl+myc )/ 3 ;
// Set Comment
///////////// Manage multiple trades /////////////
Opentrades = 0;
for cnt = 1 to TotalTrades
If OrderValue(cnt,Val_Symbol) == Symbol then
///////////// Money Manager /////////////
if mm != 0 then Lotsi = Ceil(Balance*risk/10000)/10
// Close Order after each bar!
if Opentrades != 0 and vTime != Time then
for cnt=1 to TotalTrades
If Ord(cnt,VAL_SYMBOL) == Symbol then
If (Ord(cnt,VAL_TYPE)=OP_BUY or Ord(cnt,VAL_TYPE)=OP_SELL) then
vTime = Time;
If (Ord(cnt,VAL_TYPE)=OP_BUYSTOP or Ord(cnt,VAL_TYPE)=OP_SELLSTOP) then
// Open Trade at start of bar!
if Opentrades == 0 and vTime != Time then
if Opentrades > 0 then
//vTime = Time;
Flat indicator. It works (see image) but sometimes. May anybody fix the errors there.
Trendlines and Divergence
All the indicators for the thread https://www.mql5.com/en/forum/173123 please post here.
Two indicators posted by alp.
A new EA is requested...
I am looking for an EA to do the following:
1- Use a daily chart only,
2- Identify the first major sup-res levels,
3- If the high-low of the closing daily bar is within any of the sup-res levels, then wait for the next closing daily bar,
4- Now we have two bars to deal with. If the breakout is on the support level, then look for a reversal pattern, and if found one, go long on the opening of the next daily bar. For sell signal, if any of the first two bars has hit the res level, and a reversal pattern is detected, then sell on the next daily bar. You figure out your tp-sl levels.
If anyone is interested, I have the code for the reversal patterns,
Is it possible to program the EMA Angle Zero right into another EA and make it part of that EA code , instead of having it work only like an indicator ??
Sharpe Ratio, Sortino Ratio , Rina Index etc
I'm looking for a tool that reads MT4 strategy tester reports and calculates Sharpe Ratio, Sortino Ratio, Rina Index or something similar
Even better would be if it can handle several reports from diffrents systems so I can calculate the portfolio ratio.
A nice graph wouldn't hurt either :-)
Can someone help me with a (URL to a) program that does all or part of the above?
I know it's a big request but I think knowing the ratio of your sytem/portfolio is, an often overlooked, important aspect of your system design.
To find the trend direction I use 2 MACD, one short and one long, and trade if both histograms are in the same direction.
Sometimes it is dificult to read the slope of the histogram, so I use a Stoch of the MACD hist. Chart attach pdf file.
I am new user of MT4 and don't know how to program,
Do you know were I can find a Stoch of the MACD hist.
Simple but powerful
I'm not a programmer. Spent 6 months trying on MQL3 and then 4 comes along. So I'm back to nowhere! Please can anyone help with the following. It should help other beginners as well, as it is the basics. Here's what I need:
1. A MQL that use two EMA's with a buy or sell signal on the cross depending on direction.
2. The value of each must be set separately.
3. The close signal is set on the reverse cross over.
4. Must include a trailing stoploss.
I've had a look at codersguru's posts at https://www.mql5.com/en/forum/173171 and his code looks excellent, except that it subtracts 1 MA from the other. This is excellent, but deprives me of the abillity to work with each MA independently in the Expert properties fields.
combination of ICWR indicator and THE TUNNEL METHOD
My experience in FX trading is not more so that I lost my deposit in my mini account in fibogroup broker, that is why I start to study hard in order to get a stable way to trade with minimum risk, in this forum I learn many things and I'm almost clear and find out basic matters, I think the combination of ICWR indicator and THE TUNNEL METHOD can make a stable strategy and if it is possible to convert it to Expert Advisor it maybe have good results, anyway I want to start real trading again, please tell me if you use an expert advisor that you yourself use in your real trading and has good results so that I can increase my deposit not to lose all of my deposit .
Auto Regression Channel
I kindly ask programers to take a look at the code and, if possible, explain it in plain English:
at what moment of time does this indicator change direction?
The following is totally unclear to me
The moment I write this message
GBPUSD M1 has 32785 bars of uptrend and that means almost 23 daily bars
M5 has 1525 bars of uptrend - 5.3 daily bars
M15 has 523 bars of uptrend -5.4 daily bars
M30 has 56 bars of downtrend - 1.16 daily bars
H1 has 21 bar of downtrend - almost 1 daily bar
and finally H4 has 68 bars of uptrend - means 11.3 daily bars.
D1 has 12 bars of uptrend
Question again: how is it possible that one minite bar chart counts 22 days of uptrending Cable and at the same time so drastically differs from H1 chart?
Please enable the necessary setting in your browser, otherwise you will not be able to log in.