Harden HIT entry and manager state handling
This commit is contained in:
@@ -512,14 +512,46 @@ bool IsProcessResultReady(const string done_file, const string running_file, con
|
||||
|
||||
if(!FileIsExist(result_file))
|
||||
{
|
||||
Print("[", label, "] done exists but result file is missing: ", result_file);
|
||||
return false;
|
||||
Print("[", label, "] done exists but result file is missing: ", result_file);
|
||||
DeleteDoneFile(done_file);
|
||||
DeleteRunningFile(running_file);
|
||||
ResetExternalProcessState(process);
|
||||
MarkProcessRetryPending(label);
|
||||
return false;
|
||||
}
|
||||
|
||||
DeleteRunningFile(running_file);
|
||||
return true;
|
||||
}
|
||||
|
||||
//+------------------------------------------------------------------+
|
||||
//| |
|
||||
//+------------------------------------------------------------------+
|
||||
/**
|
||||
* @brief Mark a missing-result Python run for immediate retry on the next tick.
|
||||
*/
|
||||
void MarkProcessRetryPending(const string label)
|
||||
{
|
||||
if(label == "trend")
|
||||
{
|
||||
g_ea.trend_state = MARKET_TECHNICAL_ERROR_STOP;
|
||||
g_ea.load_trend_flg = false;
|
||||
g_init_trend_pending = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if(label == "entry")
|
||||
{
|
||||
g_ea.res_chk = 0;
|
||||
g_ea.zone_res_chk = 0;
|
||||
g_ea.load_target_flg = false;
|
||||
g_bars_H1_check = false;
|
||||
g_bars_M15_check = false;
|
||||
g_ea.chk_cnt = 0;
|
||||
g_init_entry_pending = true;
|
||||
}
|
||||
}
|
||||
|
||||
//+------------------------------------------------------------------+
|
||||
//| Python開始可能状態を返す関数
|
||||
//+------------------------------------------------------------------+
|
||||
|
||||
Reference in New Issue
Block a user