Hello aggs.... Simply count orders by type.... Such as under....
Fix the magicnumber component if need be...h
Inserted Code int start() //-- if(CountType(OP_BUYSTOP) == 0) // do something //-- if(CountType(OP_BUYLIMIT) == 0) // do something return(0); int CountType(int type) int count=0; for(int I = 0; t lt; OrdersTotal(); I ) return(count);
And in addition to this I will make myself a library that contains these helpful functions (such as the CountType() example from the posting above) that you'll need over and over again in most of the EAs that you will write later on. You may save yourself a lot of duplied and time code.