Edit Your Comment
Function that returns the number of consecutive wins

forex_trader_318221
तबसे मेंबर है Apr 07, 2016
37 पोस्टों
Aug 24, 2016 at 05:23
तबसे मेंबर है Apr 07, 2016
37 पोस्टों
Hi guys!
I’m looking for a function that returns the number of consecutive profitable trades until X victories. When the number of profitable trades hits the X value, so the count is restarted.
If someone can help me... thx!!!
I’m looking for a function that returns the number of consecutive profitable trades until X victories. When the number of profitable trades hits the X value, so the count is restarted.
If someone can help me... thx!!!

forex_trader_25447
तबसे मेंबर है Dec 21, 2010
127 पोस्टों
Aug 24, 2016 at 14:38
तबसे मेंबर है Dec 21, 2010
127 पोस्टों
This program return numbers of winners (nWin)
from last accepted loss in current symbol :
// program global variable
double nWin;
void Profit() // Return nWin
{ datetime LastTimeLOSS=0;
j=0;
while ( jLastTimeLOSS && OrderProfit()<0.0 )
LastTimeLOSS=OrderCloseTime();
}
j++; }
if ( OrderSelect(0,SELECT_BY_POS,MODE_HISTORY) )
if ( LastTimeLOSS==0 ) LastTimeLOSS=OrderOpenTime();
else {}
else LastTimeLOSS=TimeCurrent();
j=0; CurrentPROFIT=0; nWin=0;
while ( jLastTimeLOSS ) nWin++;
j++;
}
}
from last accepted loss in current symbol :
// program global variable
double nWin;
void Profit() // Return nWin
{ datetime LastTimeLOSS=0;
j=0;
while ( jLastTimeLOSS && OrderProfit()<0.0 )
LastTimeLOSS=OrderCloseTime();
}
j++; }
if ( OrderSelect(0,SELECT_BY_POS,MODE_HISTORY) )
if ( LastTimeLOSS==0 ) LastTimeLOSS=OrderOpenTime();
else {}
else LastTimeLOSS=TimeCurrent();
j=0; CurrentPROFIT=0; nWin=0;
while ( jLastTimeLOSS ) nWin++;
j++;
}
}

*व्यवसायिक इस्तेमाल और स्पैम को ब्रदाश नहीं किया जाएगा, और इसका परिणाम खाता को बन्द करना भी हो सकता है.
टिप: किसी चित्र या यूट्यूब या URL को पोस्ट करने से वे अपने आप आपके पोस्ट में आजाएगा!
टिप: @ चिन्ह को टाइप करें उपभोगता के नाम को अपने आप करने के लिए जो इस चर्चा में भाग ले रहा है.