Remove (expire) an unconfirmed order at close of the candle (daily)

MQL5 エキスパート

仕事が完了した

実行時間1 日

指定

Hello,

Based on some conditions my EA adds an order (not a deal) in the market at the high of the previous daily candle (for the a Buy. See below). For a sell it's the opposite.

If the market doesn't cross that order before the close of the candle (daily) the order should be removed.  As per below I tried using ORDER_FILLING_DAY and ORDER_TIME_SPECIFIED_DAY to handle that but it does not seem to work. 

 Who can help? I expect that to be fairly easy. 

 

 if(Buy_Condition_1 && Buy_Condition_2 && Buy_Condition_3)
     {
         ZeroMemory(mrequest);
         mrequest.action=TRADE_ACTION_PENDING;                                      // pending order
         mrequest.price = NormalizeDouble(mrate[previous].high,_Digits);            // latest Bid price
         mrequest.sl = NormalizeDouble(mrate[previous].low, _Digits);               // Stop loss
         mrequest.tp = NormalizeDouble(latest_price.bid + TKP*_Point,_Digits);      // Take Profit
         mrequest.symbol = _Symbol;                                                 // currency pair
         mrequest.volume = Lot;                                                     // number of lots to trade
         mrequest.magic = EA_Magic;                                                 // Order Magic Number
         mrequest.type= ORDER_TYPE_BUY_STOP;                                        // Sell Order                          
         mrequest.type_filling = ORDER_FILLING_IOC;                                 // Order execution type
         //mrequest.type_time= ORDER_TIME_DAY;                                      // Good till current trade day order;
         mrequest.type_time = ORDER_TIME_SPECIFIED_DAY;                             // Good till specific day
         mrequest.stoplimit=NormalizeDouble(mrate[previous].high,_Digits);          // Stop Limit

         TimeToStruct(mrate[current].time, mdate);
         mdate.hour = 23;
         mdate.min = 59;
         mdate.sec = 59;
         mrequest.expiration = StructToTime(mdate);                                      // Specific day

 

応答済み

1
開発者 1
評価
(219)
プロジェクト
405
60%
仲裁
13
38% / 23%
期限切れ
160
40%
類似した注文
a coder is required to add an indicator to existing ea The new indicator will work as 1. option to combine with exiting indicator to open trade 2. it will be used as alternative BE point 3. It can also be used to close order or combine with other to close trade The second Job is telegram bot to get alert fr news trade and others Details when you apply i will test the ea work on live market and all bug is fixed before
Hello, I want to make an EA based on SMC and a developer that is familiar with the concept and full understanding of this. Must have done similar jobs before and be able show it. I only want to work with developer that has good track record and is precise. Further information will be handed when contact is made. Developers that has zero rating will not be considered. Listed price is a base point. The project can also
EA DEJA FABRIQUE ? MODIFIER QUELQUE LIGNE POUR LE RENDRE RENTABLE /////////////////////++++++++++++++++++++++++++++++++++ EA AVEC UN SYTEME SIMPLE ; SEULEMENT A MODIFIER %%%%%%%%%%%%%%%%%% SI PERSONNE SACHANT CODER CORRECTEMENT , CE TRAVAIL EST POUR TOI
Trade methodology based on Red and Green lines entering Overbought / Oversold zone. Using confluence of Higher time frame, Moving Average a trade can enter when there is a strong slope angle. Market Base Line is used to determine overall market sentiment. This is designed to be an established trend scalping strategy on lower time frames. To be used initially on demo then real account when settings have been fine
There are six conditions in total . source code from an existing expert will be provided to aid the completion of this job . - Install the following by the Panel (copy paste form my existing Expert ) 1. Pips Lost : number of pips lost ( monthly reset ) 2. Pips Gained : number of pips gained ( monthly reset ) 3. Have a black background to avoid the
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: function (A) Add Transform combine the 4 Expert Advisors into just 1 Expert Advisor, maintaining the individuality of each one Leave in extern (false) or (true)
Description: I am seeking an experienced MQL5 developer to create a custom Expert Advisor (EA) for MetaTrader 5 based on a specific trend-following strategy. The strategy includes precise risk management, advanced trade management features, and additional risk management tools. The EA should be adaptable to any timeframe on which it is attached. Below are the detailed requirements and parameters for the EA: Strategy
I need an EA trading frequently (HFT or something like), and it sould have some features below: 1、Have a clear trading logic 2、Have a good backtest result 3、Have a demonstrated benefitable result in a live account trading 4、Can avoid the news time period or not sensitive to news
Tenho um EA mql4 que está com funcionalidades funcionando e outras com funcionalidades sem funcionar. Tenho um vídeo do EA funcionando como deve funcionar perfeitamente. O meu não consegue seguir o mesmo programa pois quando coloca os pontos de parada e retirada são bem diferentes. Não tenho pressa para tempo, só queria que conseguisse renovar o EA. O arquivo do grafico anexo é como ele se encontra agora. O certo é
New york session based strategy 9:30 open Price takes out buy side or sell side liquidity Usually using 15min high and lows 5m entry Price takes out that high/low and price must close strongly back into the zone Is price is above price we have a sell bias vis versa for buys Sl is at the high or low with option for “offset” for cushion Tp is usually the opposite High or low. Would like the option for set pips-points &

プロジェクト情報

予算
10 USD
開発者用
9 - 9 USD
締め切り
1 日