仕事が完了した
実行時間7 日
依頼者からのフィードバック
Good work, thanks for a good feedback
開発者からのフィードバック
Great customer. Fast communication. I look forward to working with you again.
指定
Problem description
False trades at transition of a trading session to the next day
At a price gap (a sharp jump in the spread) at the beginning of a new session, the Expert Advisor repeatedly opens deals with the same volume, although the logic should block new orders if the spread exceeds the max_spread threshold.
No possibility to set a “quiet” interval between sessions
The robot does not know how to skip trading in a predefined time interval (for example, from 23:50 to 00:10), which aggravates the effect of false signals on gaps.
Insufficient protection at increased spread
The current IsSpreadTooHigh() method only stops opening once, but does not guarantee that the spread has not decreased and new orders have not been opened at the moment of checking.
Goals and Objectives
Goal: Eliminate false trades on gaps and give traders a flexible tool for “quiet” periods between sessions.
Objectives:
Diagnosing and fixing bugs that lead to multiple openings at high spread.
Adding new input parameters for setting a “quiet” interval between sessions.
Strengthening the logic of protection against opening trades at high spread.
Input parameters (add):
mql
Copy
input int spread_cooldown = 30; // Quarantine time after spread exceeding (in seconds)
input bool check_on_every_tick = true; // Repeat spread check not only in OnTimer, but also in OnTick.
2 Setting a “quiet” interval between sessions
Requirement FT-2.1
Input parameters for the time range in which trading is completely disabled:
mql
Copy
input datetime session_break_start = D'1970.01.01 23:50'; // Quiet period start time
input datetime session_break_end = D'1970.01.01.02 00:10'; // Quiet period end time
Requirement FT-2.2
Check at the beginning of each cycle in OnTimer() and OnTick():
mql
Copy
datetime now = TimeCurrent();
if(InSessionBreak(now))
return; // Completely skip the logic of opening/managing orders
where InSessionBreak() returns true if session_break_start ≤ now.time_of_day < session_break_end.
3Diagnosis and elimination of false trades
Requirement FT-3.1.
Audit ManageBuyPositions() and ManageSellPositions() - ensure that check_position_*() and IsSpreadTooHigh() are called before each new trade.Buy()/Sell().
Requirement FT-3.2
Add a centralized wrapper function CanOpenNewOrder() that integrates:
magick count number check;
check of “quiet” interval;
spread check;
check of position repetition.
応答済み
1
評価
プロジェクト
346
29%
仲裁
36
28%
/
64%
期限切れ
10
3%
取り込み中
2
評価
プロジェクト
6
17%
仲裁
0
期限切れ
1
17%
暇
パブリッシュした人: 3 codes
3
評価
プロジェクト
14
14%
仲裁
8
0%
/
88%
期限切れ
2
14%
取り込み中
プロジェクト情報
予算
50+ USD
締め切り
最高 5 日