Multi Symbol EA – Bug Fix

指定

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


ファイル:

応答済み

1
開発者 1
評価
(12)
プロジェクト
12
25%
仲裁
1
0% / 100%
期限切れ
0
2
開発者 2
評価
(41)
プロジェクト
46
28%
仲裁
9
0% / 100%
期限切れ
7
15%
3
開発者 3
評価
(26)
プロジェクト
34
26%
仲裁
7
14% / 43%
期限切れ
7
21%
4
開発者 4
評価
(427)
プロジェクト
447
73%
仲裁
5
80% / 0%
期限切れ
0
取り込み中
5
開発者 5
評価
(21)
プロジェクト
24
17%
仲裁
15
20% / 40%
期限切れ
6
25%
類似した注文
Project Description: I am looking for a highly skilled MQL5 developer to create a robust solution for a persistent TLS handshake failure. My Expert Advisor (EA) needs to connect to a secure WebSocket server ( wss:// ) hosted on Railway.app or any other online websocket provider, but the connection consistently fails during the security negotiation phase. Ideal Candidate Skills: Deep expertise in MQL5 programming
I have a custom EA that I need optimized. I need it optimized for many pairs and the set files sent to me. The EA was created a few months ago, it works, but I need it optimized for it to run better
i am looking for an indicator that gives buy sell signal by placing arrows on the chart, signals must not repaint or be placed with an offset, i want it to be accurate enough so i can trade from signal to signal and actually make profit, do any one have a strategy and skill to create such an indicator, and also it is to mql5, ( Important is, It must have No repainting and No offset ), if you know it is something you
Trading Ea 30+ USD
hi, i wish to make an EA which generates trades from my indicator signals. and the EA should also have risk parameters and news features. I will also need some input from you to add reversal/breakout/volatiltiy expansion entry points
hello dear developer I'm looking for a NinjaTrader developer to create a semi-automated trading strategy that enters trades based on visual text signals from my custom indicator. The strategy should handle automatic entries, allow manual management after entry, and include configurable settings like TP, SL, and trading time. If you're experienced with NinjaTrader and strategy development, feel free to reach out
I need a skilled Pine Script developer to finalize and fix a Pine Script v5 strategy that was converted from TradeStation EasyLanguage using AI. The script is mostly complete but has logic issues, missing buy/sell signals, and lacks proper exits and risk control. The project involves cleaning it up and building two working scripts: 1. A TradingView Strategy (backtest-ready, includes full entry/exit logic and risk
I'm looking for an experienced Pine Script developer to help fix, enhance, and finalize a strategy converted from TradeStation EasyLanguage into Pine Script v5 for TradingView. The current script (pivot trend system) has been partially converted using AI but still contains errors and lacks full signal plotting and strategy functionality. The job involves: 1. Debugging and cleaning the existing Pine Script code 2
Hi there, I am looking for someone with experience to help me to code the indicators listed bellow. I need the to be coded in a specific way I will provide OOP template. There are 7 to 8 indicators. Mainly they have filtering which needs to be added. Thanks
Preciso de uma tabela dinâmica para monitorar até 9 pares de Forex usando meu indicador VWAP de 6 bandas no TradingView. Requisitos: - A tabela deve mostrar em tempo real quando o preço ultrapassa a penúltima banda (entre as duas últimas bandas). - As bandas são codificadas por cores (com base nas seleções de cores) e devem mudar de cor conforme a banda tocada/ultrapassada. - A tabela não deve manter histórico
Hello great developer am looking for developer that can help me with following requirement, if so mentioned time and quote. https://docs.google.com/spreadsheets/d/1UWbZ2TBIM_8SSmUTMskDiewlkGjIPioEAFHKiOEt6b0/edit?gid=1296176961#gid=1296176961 check the attach link to check the full description there i will be looking for great developer that will bid for this job

プロジェクト情報

予算
50+ USD
開発者用
45 USD