MAGIC NUMBER EA

エキスパート

指定

Dear Sir,
I need help. I wish to set an EA that looks up transaction on my list of trasaction and checks if the transaction is amongst the market and pending orders , the opens if it is not else do nothing about it. So I am using the Magic Number as the common field. I have written an EA and compiled it. but the EA is not working. Find below the EA.No transactions are opened even though I have no pending nor market orders. What can be the problem. Please help.
//+------------------------------------------------------------------+
//|                                                   First Part.mq4 |
//|                                                       Fon Ngando |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "Fon Ngando"
#property link      ""

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
  
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
  
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
   int i=0;
   int j,e,F,G;
   double P,SL,TP,N,V,MN,C;
   double Transaction_Array[][];
   Transaction_Array[11][9]=
{         
0    ,    75.50    ,    75.00    ,    105.00    ,        ,    2    ,    0    ,    0    ,        ,
0    ,    75.50    ,    75.00    ,    75.60    ,        ,    1.33    ,    0    ,    1    ,        ,
0    ,    75.50    ,    75.00    ,    75.70    ,        ,    1.06    ,    0    ,    2    ,        ,
0    ,    75.50    ,    75.00    ,    75.80    ,        ,    0.8    ,    0    ,    3    ,        ,
0    ,    75.50    ,    75.00    ,    75.90    ,        ,    0.53    ,    0    ,    4    ,        ,
0    ,    75.50    ,    75.00    ,    76.00    ,        ,    0.28    ,    0    ,    5    ,        ,
0    ,    75.50    ,    75.00    ,    76.10    ,        ,    0.2    ,    0    ,    6    ,        ,
0    ,    75.50    ,    75.00    ,    76.20    ,        ,    0.2    ,    0    ,    7    ,        ,
0    ,    75.50    ,    75.00    ,    76.30    ,        ,    0.2    ,    0    ,    8    ,        ,
0    ,    75.50    ,    75.00    ,    76.40    ,        ,    0.2    ,    0    ,    9    ,        ,
0    ,    75.50    ,    75.00    ,    76.50    ,        ,    0.2    ,    0    ,    10    ,        ,


};
  
  
 for(i=0; i<11; i++) // For market and pending orders
  {
           
   N=Transaction_Array[i][7];    // Determine magicnumber
                                // of transaction on my list
   for (e=0;e<OrdersTotal();e++)
    {
     if((OrderSelect(e,SELECT_BY_POS)==true)
     &&(OrderMagicNumber()==N))// look up Magic Number.
        {}                   //Magic Number found so trans already opened
          else
        {   P=Transaction_Array[i][1];     // Order open price
            SL=Transaction_Array[i][2];     // SL price
            TP=Transaction_Array[i][3];   // TP price
            N=Transaction_Array[i][7];       // Order number
            V=Transaction_Array[i][5];      // Amount of lots
            j=Transaction_Array[i][6];   // Ordertype 0=buy, 1=sell
            C=Transaction_Array[i][9];
                   
                   
                   
                     
                 
             if(P==Ask&&j==0)               
               {
                OrderSend(Symbol(),OP_BUY,V,P,1,SL,TP,C,i);
                return (OrderSend(Symbol(),OP_BUY,V,P,1,SL,TP,C,i));
               }
             if(P<Ask&&j==0)
               {
                OrderSend(Symbol(),OP_BUYLIMIT,V,P,1,SL,TP,C,i);
                return (OrderSend(Symbol(),OP_BUYLIMIT,V,P,1,SL,TP,C,i));
               }
              if(P>Ask&&j==0)
                 {
                  OrderSend(Symbol(),OP_BUYSTOP,V,P,1,SL,TP,C,i);
                  return (OrderSend(Symbol(),OP_BUYSTOP,V,P,1,SL,TP,C,i));
                 }                 
              if(P==Bid&&j==1)
                 {
                  OrderSend(Symbol(),OP_SELL,V,P,1,SL,TP,C,i);
                  return (OrderSend(Symbol(),OP_SELL,V,P,1,SL,TP,C,i));
                 }
              if(P<Bid&&j==1)
                 {
                  OrderSend(Symbol(),OP_SELLSTOP,V,P,1,SL,TP,C,i);
                  return (OrderSend(Symbol(),OP_SELLSTOP,V,P,1,SL,TP,C,i));
                 }
              if(P>Bid&&j==1)
                 {
                  OrderSend(Symbol(),OP_SELLLIMIT,V,P,1,SL,TP,C,i);
                  return (OrderSend(Symbol(),OP_SELLLIMIT,V,P,1,SL,TP,C,i));
                 }
                        
                
        }
    }
  }
//----
  
//----
 
  }
//+------------------------------------------------------------------+

応答済み

1
開発者 1
評価
(71)
プロジェクト
254
53%
仲裁
16
50% / 38%
期限切れ
83
33%
2
開発者 2
評価
(3)
プロジェクト
3
33%
仲裁
1
0% / 100%
期限切れ
0
3
開発者 3
評価
(550)
プロジェクト
827
73%
仲裁
15
53% / 13%
期限切れ
193
23%
4
開発者 4
評価
(273)
プロジェクト
395
63%
仲裁
70
53% / 26%
期限切れ
198
50%
5
開発者 5
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
類似した注文
Hi Developer, I'm having an issue with one EA that works on market structure break using limit orders and had many slippage during news impact and I had to manually close the limit orders every time which is cumbersome. I know that are some News Filter EA in the MQL market but it is not as I desire. I want a developer to help me out to develop an EA to control other EAs that has no news filter thru magic number if
Automate my trading 30 - 100 USD
Hi, I need a mql5 EA sellstop buystop for one minute time frame in all currency pair. That ea would be autotrade and close once profitable. I will pay once confirms the ea profit in each trade
The EA should show a small window with execution buttons in the corner of the screen. Its window should be compact and movable on the screen. The EA should be able to do / include the following: - a field for writing the "SL percent" and an execution button to move the SL at the given percentage. The "SL percent" applies only to the last opened order. - "close the last order" button - "close all orders" button - it
Dear coder, I need an MT5 expert advisor with parameters detailed as : https://drive.google.com/drive/folders/18LBhYTb8bYz3pM2Szyyq4-RoTmBtaWIw?usp=sharing 1)Need the EA code to be optimisation friendly and hence able to be optimise with the shortest time possible especially when using Fast Genetic : Complex criterion using open price or OHLC 2)Able to provide sourcecode 3)Able to resolve ongoing bug if any . 4)Able
Hi developers, would like an EA developed that I can use for backtesting and possibly as a Trading Robot if I have enough confidence in it. Here are the rules: EA is for forex, indicies, commodities etc. 5 minute timeframe (can add more timeframes depending on development cost) Price at 9pm is "noted" Then the price at the following 7am is "noted". Once a candle closes above/below the 7am price in the direction of
QuantumTrader 30 - 200 USD
Request for development of machine learning robots for MetaTrader 5 (MT5) **Description**: Willing to develop experience in programming trading robots using MQL5 language and can learn machine learning on MetaTrader 5 (MT5) platform. The robot should be able to implement a multidisciplinary strategy on a set of technical indicators and multiple rules. I need to develop the robots so that they can work in an
The goal is to develop a system that mirrors trade actions (Buy/Sell) from a CTrader demo account on Cronos Markets to multiple prop firm accounts on TradeLocker, ensuring accurate replication of trades while adjusting risk proportionally. I was wondering if you could help me with copy trading an EA’s action on Cronos markets (uses CTrader) into a prop firm account that I bought with TooOne Trader (uses TradeLocker
I ask for my requirements as follows for a developer who knows how to connect accounts for those who are successful, that is copy trade VPS, so I ask that this order be very effective and very high standards in the work that will give fruit especially
Hello, i have this EA (Blessing) attached and whenever i enter Multiplier: 1.5 Starting Lot: 1 on the config it opens a position of 1 Lot, next 2 lot, next 3 lot, next 5 lot but i need to have it open: 1 lot, 1,5 lot, 2.25 lot, 3.38 lot and so on. You need to modify the EA so it opens the correct values. Please test it with the set i have attached and let me know if you can do it. The ffcal is an indicator and need
Hey Greeting Am in need of Tradingview Developer that can combine existing Tradingview indicator to develop a strategy based on my conditions The Source code of those Indicator is available with me. Kindly bid and let proceed with the project Thanks

プロジェクト情報

予算
100- USD
締め切り
最高 10 日