Correct invalid stop error on second trade row

This commit is contained in:
Nkondog Anselme
2021-11-15 21:32:23 +01:00
parent 674ea18ee4
commit c5f9fe21e4
5 changed files with 140 additions and 65 deletions
@@ -125,6 +125,7 @@ void CSignalGrid::UpdateSignal()
for(int i = cntO-1; i>=0; i--)
{
ticket = OrderGetTicket(i);
if(OrderSelect(ticket))
{
@@ -160,6 +161,8 @@ void CSignalGrid::UpdateSignal()
realTotalBuy = pCountSell+1;
realTotalSell = pCountBuy+1;
Print("Signal conditions ........................................................................");
if(OrdersTotal() == 0 && PositionsTotal() == 0)
{
SetSignal(OFX_ENTRY_SIGNAL, OFX_SIGNAL_BOTH);