CustomStopOut: reading closeWorst, the function that closes your worst trade first
double level = CsoMarginLevel(equity, margin); if(m_marginCall.Update(margin, level, m_settings.callLevel)) { CsoNotify(m_settings, CsoMarginCallMessage(level, m_settings.callLevel)); } if(!CsoIsBelow(margin, level, m_settings.stopOutLevel)) { m_refusals.Clear(); m_hasReportedNothingClosed = false; return false; } return closeWorst(level); Compute the margin level, …