EA programming - STUCK - Pls Help

thread: EA programming - STUCK - Pls Help

  1. #1

    EA programming - STUCK - Pls Help

    I'm writing an EA for a specific method. My EA opens pending orders. . Either BUY STOP, BUY LIMIT, SELL STOP or SELL Limit.

    This component is OK. What I want is that to open another pending order if a BUY STOP pending order has shifted into a BUY order.

    So basically, in my code (in beginning method), I need to check if a pending order has shifted to an order..not certain how to do that. .

    Appreciate any help or hints. .

  2. #2
    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);

  3. #3
    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.

  •