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

MQL5 Uzman Danışmanlar

İş tamamlandı

Tamamlanma süresi: 1 gün

İş Gereklilikleri

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

 

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(219)
Projeler
405
60%
Arabuluculuk
13
38% / 23%
Süresi dolmuş
160
40%
Çalışıyor
Benzer siparişler
I am looking for a highly sample and ready and tested profitable EA to purchase.if it meets my requirements i will order same one.EA must be low drawdown high profit on any timeframe
i have a ready made SMC EA and looking for optimizing and debugging and also adding back the missing things in the requirement file. Basically work with the current code and refine it to fit the requirement file. Most indicator is already in the EA and the requirement file below are mostly finish. here are the things need to add back and debug based on the requirement file 1. TP from the filter and need to check
If you think you can replicate EA ("reverse engineering") from Metarader's Market, and create a new EA from scratch that works 100% the same - please send an offer. I have already managed to find out many features of that EA (entry times, risk management, averaging, trailing...) but I still miss a few
Candle wick bot The bot will have a set amount of wick length to enter trade at candle open price, there will be a set Amount in points that the candle wick has to be to then enter that opposite of the wick direction Settings will look like this : Timeframe: (meaning which candles you’re using to measure open price from for the wick length ) If set to 5 min it’ll be using 5 min candles , if set to 15 it’ll use 15
Looking for a developer to create an MT4 EA based on a custom currency strength indicator and simple moving average. Will provide currency strength indicator code to the selected developer. Buy rules If the EA added in the EURUSD chart and EUR has a currency strength above or equal to 6 and USD has strength less than 2. Wait for the prices comes back to SMA and open the buy trade if the price closes above SMA. Place
I have an equity reporter. This equity reporter displays the maximum and minimum equity reached over a specific interval. So, if the interval is set to 24 hours, the script will generate data in the format: "Profit ATT" (profit AtThatTime) shows max./min. during the specific interval This specific report shows data in pips. It can also be set to display in price or percentages. The interval is also easily adjustable
Sistema HTF EFECTIVO 30 - 60 USD
Hola, me gustaría que un programador experimentado creea un sistema de trading EA que abra y cierre operaciones muy rápido en segundos (HFT). Sería óptimo tener una opción/botón para activar solo para comprar o solo para vender (operaciones unidireccionales). Con una buena interfaz gráfica de usuario. Se agradece la implementación de su propia experiencia con sistemas de trading HFT. Es para mercados volátiles como
Hello, I would like an experienced programmer to create an EA trading system which opens and closes trades very fast within seconds (HFT). To have an option/button to activate either for only buy or only sell (one way trading) would be optimal. With a nice GUI. Implementing your own experience with HFT trading systems is welcomed. It's for volatile markets such as XAUUSD or US30. Taking advantage of order placements
The strategy is a martingale type . i.e if it hits the stop loss , it will double the lot size and place again in that direction, and when it hits the take profit at any level of the martingale, it will start over from the first lot size used initially
I want you to make me an indicator in Training View. Its idea is very simple, and I want it to have an alarm. Here's a clearer step-by-step guide to checking the last 50 candles on your chart and applying Fibonacci retracement levels based on their colors: Identify Candle Color: Start from the 100th candle from the left on the chart and check its color. If the 100th candle is green (i.e., the close is higher than the

Proje bilgisi

Bütçe
10 USD
Geliştirici için
9 - 9 USD
Son teslim tarihi
1 gün