Multi Symbol EA – Bug Fix

MQL5 Indicatori Esperti

Specifiche

Objective: Find/fix 3 Bugs

Tasks:

1)       Bug find/fix: automatically identify and exclude orders in the “placed” status

2)       Bug find/fix: understand why sometimes the position opens with double volume and solve it

3)       “Force close” positions after the max position time (existent parameter)

 

EA details:

The EA monitors 75 symbols identified in a CSV file placed on the FILE folder. The same CSV also contains a series of parameters that are used to control when to open and close positions.

The code contains 1200 rows, and the open signal is on the following part:

 

And the close signal is on this part:

 

Other important aspects of the EA:

-          Whenever MultiSymbol = False, EA will only runs for the graphic where the EA was apply to (single symbol) and all inputs will come from the input screen. This should also be the choice when backtesting.

-          Whenever MultiSymbol = True, EA will search for the for the .csv file and get the customized inputs for each symbol

-          When using the MultiSymbol, the graphical lines (TP, SL, etc) will only appear for the graph where the EA is applied. If you open another screen, the lines will not appear, but if you drag another symbol to the same graph, the lines will change to reflect the scenario of this new symbol

-          None of the issues happens in the backtest, meaning that the issue happens when interacting with the broker, which is something that makes the fixing more difficult, also because the issues are not consistent

 

Why ALL issues happen:

When the buy signal is open, EA sends the order, but sometimes, this order does not get processed because:

·         Something is wrong in the broker for that particular Symbol

·         There is no more volume available at that price

All this will lead the order to stay in a “Placed” status. The big problem is that EA only checks if there is no position open for a Symbol, before sending a new order for that Symbol. This is expected, to have only one position open for each Symbol.

By not checking these placed positions, if the signal stays open, EA will keep sending orders, causing a big risk to the user if the case is that of opening a position. If the case if trying to close a position, the placed get there, never is processed and EA seems to “forget” about that position, never closing it, even after the Max time is reached

 

1)       Bug find/fix: automatically identify and exclude orders in the “placed” status

Sometimes, the buy/sell signal opens, the order is sent, but the order remains in the “placed” status, causing a lot of issues later. This happens in rare occasions, usually when the symbol “freezes” for some reason, right when the signal opens.

These placed positions might also be the reason why the EA malfunction regarding an open position, not closing for any of the “close triggers”

The expect solution (open to suggestion) is to constantly look for this status and remove them (on tick)

Also, in order to avoid more issues, if a symbol is on placed status, check and do not send other orders for the same symbol while this situation is not changed.


 

2)       Bug find/fix: understand why sometimes the position opens with double volume and solve it

The volume to fill the order is calculated based on the lot size defined in the parameter. Example: If the lot size = $10k and price of the stock is $35, the EA should try to buy 10k/35 volume, or 285 units. Then the lower next multiple of 100 need to be select, in this case 200.

In this market, all order must be in multiples of 100 (100, 200, 300, etc). This is controlled by the Lot_Min parameter.

Must of the time, this process works well, and the right volume is sent as an order, but in 1% of the cases, the order is sent with double the volume. There is apparently no relation to a specific symbol or price

After many testing, it seems that when the order takes time to be processed, EA sends another order (because the signal still open) and when broker manages to process the order, it process both of them.

 

3)       Force EA to close positions after the Max time is reached

It seems that when above issues (previously explained) happen, that particular Symbol are not monitored anymore for SL,TP and Time limit. Apparently that symbol might be getting out of the EA array that checks the open positions.

Closing a position after X minutes, should not be linked to anything else, for safety purposes, any position open more than X minutes should be closed

 

How to test the Fixes:

Backtest can be used to check basic keyl aspects of the code, but only in Single Symbol mode.

As mentioned before, these issues only happen in real accounts in live mode, since the issue is related to the interaction with the broker

Once the project starts I will share user/password to an demo account with the correct broker that will allow you to better test the EA


File:

Con risposta

1
Sviluppatore 1
Valutazioni
(12)
Progetti
12
25%
Arbitraggio
1
0% / 100%
In ritardo
0
Gratuito
2
Sviluppatore 2
Valutazioni
(41)
Progetti
46
28%
Arbitraggio
9
0% / 100%
In ritardo
7
15%
Gratuito
3
Sviluppatore 3
Valutazioni
(26)
Progetti
34
26%
Arbitraggio
7
14% / 43%
In ritardo
7
21%
Gratuito
4
Sviluppatore 4
Valutazioni
(457)
Progetti
478
74%
Arbitraggio
5
80% / 0%
In ritardo
0
In elaborazione
5
Sviluppatore 5
Valutazioni
(21)
Progetti
24
17%
Arbitraggio
15
20% / 40%
In ritardo
6
25%
Gratuito
Ordini simili
Hi everyone, I’m looking for a reliable reversal indicator that signals exactly at the close of a candle, with absolutely no future‑data usage or repainting. Because I’ll be putting real money on the line, I need to be 100 % sure the signals are stable before I fund an account, so a demo version for testing is a must. What I need - An MT5 indicator that prints a buy or sell arrow on the bar’s close, never
Hi guys. Looking for a reversal indicator that places the signal at candle close without the use of future data and repainting. Due to the fact that you are bringing the strategy and the higher price I'm offering I'll like to know it doesn't repaint before putting deposit down by testing a demo version first... Waiting to hear your solutions for what I'm looking for
Hello, I need someone who can covert SuperTrend Strategy indicators on TradingView to an expert advisor with the Stop Loss and Take Profit . The trade shall close on opposite direction based on reversal . And have some features just like below . ART Length and Factor : We can customize the ART Length and Factor just like on TradingView for adaptable trade . Buy Entry: Open long trade right after the bar close (
hi 10 20 ema cross to 50 ema upside cross to buy 10 20 ema cross to 50 ema downside cross to sell confation to rsi buy sell stoploss 10 points target 10 points traling stop loss after profit trad with stoploss price to price max 2 trad open limit
Task: Modify "Moving Averages" EA – Add 3 professional features Current EA: Classic Moving Averages crossover (EMA 21 based), longs/shorts on XAUUSD/stocks Add these 3 features: 1. SELECTABLE TIMEFRAME (independent of chart) • input ENUM_TIMEFRAMES WorkTimeframe = PERIOD_H1, H2, H3, H4..... // M1, M5, M10,.... • All iMA(), Close[], Open[], High[], Low[] must use WorkTimeframe instead of current chart timeframe 2
Hello I am looking for a freelancer I am currently testing my trend EA, and while it is functioning, the performance is not efficient, I am noticing a specific behavior that needs to be addressed. I am unsure if this is an issue with the ( Entry logic code or if it is a restriction caused by the current settings/parameters). Could you please review my EA code to see why it stops trading after the initial entries? I
Hi guys, I need tradingiew indicator that will find a range on the higher time and plot it on my lower time frame indicator based on some candle formation. We won't be using zig zag or any indicator to plot highs and lows. Will use a higher time frame 3 candle formation to determine a swing high and swing low then we move to the lower time frame to the same formation. Then we'll draw some lines on the chart
I need a code for ninjatrader 8 to backtest a quite simple strategy (I think): Go long if price breaks above previous day's high by .25 points, go short if it breaks below previos day's low. I have historical semi-colon CSV minutes data for ES mini from 1997 to today, data has been tested and runs in Ninjatrader chart without problems. Code should be writen in a way so I can change stoploss and take profit levels in
Good day im looking for someone to convert MT4 indicator to MT5 EA This indicator open several arrows So everytime it open and close the arrow it should execute a trading position after confirmed valid When the buy arrow open and close it should close all sell open trades Its Non Repaint indicator To include the option to change the lot size as well for example when the first arrow trading position occur it should be
I have an existing MT5 EA (MQ5 source file provided) that trades based on horizontal lines placed on the chart. The EA works perfectly on a normal MT5 terminal, but it does not work on MT5 VPS because VPS does not render chart objects. I need a developer to modify the EA with the following requirements: 1. Make the EA fully compatible with MT5 VPS The EA currently depends on visible horizontal lines on the chart to

Informazioni sul progetto

Budget
50+ USD