Moving Avarage Cross Over

MQL4 Experts Forex

Tâche terminée

Temps d'exécution 8 minutes
Commentaires de l'employé
Very clear specifications. Good to work! Excellent customer... Thank you :)
Commentaires du client
Great Developer, he was fast and did precisely what I wanted. Also Flexible in my demands. 5 Stars

Spécifications

I am looking to further develop a simple EA I already made that is based on MA crossover.

The problem with the one I have, it uses TP and SL to close a trade.

I would for the order to close when the next cross over happens, the old order will close and the new one will open.


Below is what I have so far:


//+------------------------------------------------------------------+
//|                                       MovingAverageCrossover.mq4 |
//|                                                           737ngx |
//|                                        https://www.737ngxsim.com |
//+------------------------------------------------------------------+
#property copyright "737ngx"
#property link      "https://www.737ngxsim.com"
#property version   "1.00"
#property strict

extern int TakeProfit=50;
extern int StopLoss=25;
extern int FastMA=15;
extern int FastMaShift=0;
extern int FastMaMethod=1;
extern int FastMaAppliedTo=0;
extern int SlowMA=50;
extern int SlowMaShift=0;
extern int SlowMaMethod=1;
extern int SlowMaAppliedTo=0;
extern double LotSize = 0.01;
extern int MagicNumber = 1234;
double pips; 
 

//+------------------------------------------------------------------+ 
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
  
double ticksize = MarketInfo(Symbol(), MODE_TICKSIZE);
   if (ticksize == 0.00001 || ticksize == 0.001)
   pips = ticksize*10;
   else pips = ticksize;
return(INIT_SUCCEEDED);
  }
  
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//---
   return (0);
   
  }
  
 //+------------------------------------------------------------------+
//| Expert start function                                 |
//+------------------------------------------------------------------+
 
 
  
  int start()
  {

               
   return(0); 
  
  }
  
  
  
  
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
double PreviousFast = iMA(NULL,0,FastMA,FastMaShift,FastMaMethod,FastMaAppliedTo,2);
    double CurrentFast =  iMA(NULL,0,FastMA,FastMaShift,FastMaMethod,FastMaAppliedTo,1);
      
    double PreviousSlow = iMA(NULL,0,SlowMA,SlowMaShift,SlowMaMethod,SlowMaAppliedTo,2);
    double CurrrentSlow = iMA(NULL,0,SlowMA,SlowMaShift,SlowMaMethod,SlowMaAppliedTo,1);
    
    if(PreviousFast<PreviousSlow && CurrentFast>CurrrentSlow)
         if(OrdersTotal()==0)
            OrderSend(Symbol(),OP_BUY,LotSize,Bid,3,Bid-(StopLoss*pips),Bid+(TakeProfit*pips),NULL,MagicNumber,0,Green);
         
    if(PreviousFast>PreviousSlow && CurrentFast<CurrrentSlow)
         if(OrdersTotal()==0) 
            OrderSend(Symbol(),OP_SELL,LotSize,Bid,3,Bid+(StopLoss*pips),Bid-(TakeProfit*pips),NULL,MagicNumber,0,Red);
   
  }
//+------------------------------------------------------------------+



Répondu

1
Développeur 1
Évaluation
(229)
Projets
339
49%
Arbitrage
21
5% / 33%
En retard
24
7%
Gratuit
2
Développeur 2
Évaluation
(4)
Projets
5
20%
Arbitrage
3
33% / 33%
En retard
0
Gratuit
3
Développeur 3
Évaluation
(365)
Projets
412
36%
Arbitrage
35
26% / 57%
En retard
63
15%
Gratuit
4
Développeur 4
Évaluation
(114)
Projets
154
47%
Arbitrage
2
0% / 50%
En retard
4
3%
Gratuit
5
Développeur 5
Évaluation
(15)
Projets
24
21%
Arbitrage
1
0% / 100%
En retard
7
29%
Gratuit
6
Développeur 6
Évaluation
(547)
Projets
757
46%
Arbitrage
23
39% / 13%
En retard
63
8%
Travail
7
Développeur 7
Évaluation
(1127)
Projets
1429
62%
Arbitrage
21
57% / 10%
En retard
43
3%
Gratuit
8
Développeur 8
Évaluation
(65)
Projets
87
39%
Arbitrage
3
0% / 33%
En retard
29
33%
Gratuit
9
Développeur 9
Évaluation
(2)
Projets
2
0%
Arbitrage
0
En retard
0
Gratuit
10
Développeur 10
Évaluation
(769)
Projets
1033
44%
Arbitrage
50
8% / 50%
En retard
117
11%
Gratuit
11
Développeur 11
Évaluation
(221)
Projets
369
66%
Arbitrage
10
50% / 0%
En retard
46
12%
Gratuit
12
Développeur 12
Évaluation
(2077)
Projets
2636
61%
Arbitrage
113
45% / 26%
En retard
418
16%
Travail
13
Développeur 13
Évaluation
(1086)
Projets
1437
45%
Arbitrage
48
73% / 13%
En retard
35
2%
Travail
14
Développeur 14
Évaluation
(7)
Projets
8
38%
Arbitrage
3
33% / 33%
En retard
2
25%
Gratuit
15
Développeur 15
Évaluation
(4)
Projets
6
0%
Arbitrage
2
0% / 50%
En retard
4
67%
Gratuit
16
Développeur 16
Évaluation
(117)
Projets
138
41%
Arbitrage
30
7% / 77%
En retard
17
12%
Gratuit
17
Développeur 17
Évaluation
(2)
Projets
2
0%
Arbitrage
0
En retard
1
50%
Gratuit
18
Développeur 18
Évaluation
(548)
Projets
825
73%
Arbitrage
15
53% / 13%
En retard
193
23%
Travail
19
Développeur 19
Évaluation
(461)
Projets
902
77%
Arbitrage
25
16% / 68%
En retard
100
11%
Gratuit
20
Développeur 20
Évaluation
(563)
Projets
932
47%
Arbitrage
301
59% / 25%
En retard
124
13%
Travail
Commandes similaires
I want to make a new dashboard using 3 common indicators and the ADX indicator , which you must supply I have a MA dash which you can strip & reuse if it helps you I tried to cover all questions in the attached but i'm sure there'll be more
I want the script in mql5 language for my martingale strategy. The script should open trades in both directions buy and sell and if any trade closes in loss then open new trade in that direction by using the next volume and when trade closes in profit then reset the volume to first from volume list and also maximum consecutive losses limit will apply. If trades closes consecutively in losses and hits the limit then
I installed the E.A. into the Experts folder in MT4. When I double click on it nothing happens. When I right click and "attach to chart" nothing happens. The E.A. is not grayed out, it simply will not attach. Any help would be greatly Appreciated
Lilit ordrer 50+ USD
l doa language that allows creating trading robots and technical indicators. i can do any writing and translation so dont worry i can do what you want ke to do
hi hi there i have an strategy on tradingview and i want to automate it like metatrader EA so i want the strategy to open and close trade automaticlly on tradingview
We are looking for an experienced Expert Advisor Developer who can build a customized MT5 Expert Advisor for us. The Expert Advisor would use two built-in indicators as entry/exit signals and our own risk management strategy with customizable inputs. The goal is to create a reliable and efficient trading tool that can automate our trading process on the MT5 platform. Skills required: - Strong understanding of
The wiper 35 - 48 USD
a ll traders want to find market behavior patterns, which could help identify favorable moments for performing trading operations. They also want to eliminate randomness and influence of external factors, such as rumors, news releases, fatigue, and so on. Traders monitor charts and may formulate some formal rules, which enable objective analysis of price or tick charts. Technical indicators can facilitate such
I need EA that works on MT5 to be able to do the following: - Can recognize Support/Resistance area - Can recognize VWAP direction. - Can recognize RSI. - Can recognize Double Top/bottom, Bullish/Bearish hammer candle, Bullish/bearish engulfing candle. - Ability to set Stoploss below/above support/resistance, but risk must be fixed at a certain price. - Stoploss
I want a program that will help calculate and enter the market on full margin for me. I just need to put in the price for entry, Stop loss and TP then it will calculate the lot sizes for entering the trade on full margin on Mt5
I am seeking a highly skilled and experienced developer to assist with an important project. I need a development of an automated trading bot for NinjaTrader, utilizing a 4 SMA (Simple Moving Average) crossing strategy, with additional custom diversions for trade entries. The bot needs to be based on a strategy involving the crossing of four different SMAs. The exact periods for these SMAs and the conditions for

Informations sur le projet

Budget
30 - 40 USD
TVA (21%): 6.3 - 8.4 USD
Total: 36.3 - 48.4 USD
Pour le développeur
27 - 36 USD