Code:
if ((totalbuy()>=2)||(totalsell()>=3)) return (0); int totalbuy() { int value=0; for (int i=0;i<10;i++) { if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)) { if ((OrderType()==0)&&(TimeDayOfYear(OrderOpenTime())==TimeDayOfYear(CurTime()))) value+=value; } } return (value); } int totalsell() { int value=0; for (int i=0;i<10;i++) { if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)) { if ((OrderType()==1)&&(TimeDayOfYear(OrderOpenTime())==TimeDayOfYear(CurTime()))) value+=value; } } return (value); }
No comments:
Post a Comment