To use chat, please login.
Back to contacts
Hector Mestril (fxmiami)
Dec 23 2015 at 00:13
38 posts
Hello guys,

I have an EA that works fine, it is a price action strategy, however, I am having a little problem.
Once the signal is generated, the trade is placed and the limit reached, it places another trade again, and again, and I end up losing what I made.

I need to tell the EA to just place one trade per signal, and ignore all subsequent trades until an opposite trade arises.

Can anyone help me with this?

Thanks!

To win you have to risk loss
HalleyFX
Dec 24 2015 at 07:31
83 posts
looks like you have it looped

Don (240Z)
Dec 27 2015 at 17:30
50 posts
another switch ... limit reached 1/0 or true/false .... at the beginning of your trade signal place this switch .... trade or return{0}

“Everybody should have a dream. What if that dream comes true?” – Jack Ma
IXBONE
Dec 29 2015 at 07:08
97 posts
-time based
-bar based
-order based (open,closed, history)
-profit based

many many options....
no one can fix this without code!

lawners1791
Jan 03 2016 at 08:12
17 posts
@IXBONE yes i like the different option with the above mention on referring ones with the decision to gives with the chance on ea to work with the new order on creating position.


Hector Mestril (fxmiami)
Jan 04 2016 at 18:54
38 posts
It would be order based, with a profit.

Thanks guys.

Help?

To win you have to risk loss
IXBONE
Jan 05 2016 at 12:05
97 posts
buy history sample, must be extended with tp code

   int CountBuyHistoryOrders(){
     int buycount=0;
      if(OrdersHistoryTotal()>0){
        for(int w=OrdersHistoryTotal()-1;w>=0;w--){
         if(OrderSelect(w,SELECT_BY_POS,MODE_HISTORY))
         if(OrderSymbol()!=Symbol() || OrderMagicNumber()!=Magic)continue;
         if(OrderOpenTime()<iTime(NULL,1440,0))break;
         if(OrderType()==OP_BUY || OrderType()==OP_BUYLIMIT || OrderType()==OP_BUYSTOP)if(OrderOpenTime()>=iTime(NULL,1440,0))buycount++;
      }
   }
   return(buycount);
 }

lawners1791
Jan 05 2016 at 15:30
17 posts
IXBONE posted:
-time based
-bar based
-order based (open,closed, history)
-profit based

many many options....
no one can fix this without code!
the framing with the conservatism on leaving of the different offers with the focus of objection on referring ones to work with the initials on trader to gains of the limitation on order creation with the notice of preference as recognizing alert of incoming option.

Hector Mestril (fxmiami)
Jan 05 2016 at 16:14
38 posts
Thanks IXBONE,

But, where do I place this code?

Should I send you the EA via pm so you can add?

Thanks!

To win you have to risk loss
IXBONE
Jan 06 2016 at 08:22
97 posts
lawners1791 posted:
the framing with the conservatism on leaving of the different offers with the focus of objection on referring ones to work with the initials on trader to gains of the limitation on order creation with the notice of preference as recognizing alert of incoming option.


no idea what you talking about...

Please login to comment.