How To Make Max BUY Order and Max SELL Order. if want Open Position in One Pair, 1st Signal is Open BUY and next Signal Open SELL in One Pair. thanks
- How to Prevent EA From Opening Another Position if One Already Exists for Same Currency Pair
- How to buy one pair from one broker and sell it to another broker ?
- Max Buys, Sells and Trades.
Please edit your post . . . or have your code deleted.
Please use this to post code . . . it makes it easier to read.
Don't delete it yet ;)
That EachTickMode variable (?!?), did you build this using EA builder or something like that ?
Don't delete it yet ;)
I'm not going to, I always give at least 24 hours for the OP to respond to my polite request . . . many do, so thank you to them :-)
Al right, I leave it to you ;)
It is EA Builder that was discussed before https://www.mql5.com/en/forum/139865.
And you also a MT4 signal provider : SusifoFX (aka Novy Susilo) https://www.mql5.com/en/users/SusiloFX
i try include Max Buy Order and Max Sell Order, can you help me.. thanks
Help you ? or code it for you ? what have you tried so far ?
i try to change All Max Order is two OP SELL and BUY with my analisis, but All OP is Four with three OP SELL and one OP BUY or three OP BUY and one OP SELL. maybe any error code with EA Builder, but i so tried to find it.
i try to change All Max Order is two OP SELL and BUY with my analisis, but All OP is Four with three OP SELL and one OP BUY or three OP BUY and one OP SELL. maybe any error code with EA Builder, but i so tried to find it.
OK, what code did you change to what ?
for (int s = 0; s < STotal; s ++) { OrderSelect(s, SELECT_BY_POS, MODE_TRADES); if(OrderType() <= OP_BUY && OrderSymbol() == Symbol()) { IsTrade = True; if(OrderType() == OP_SELL) {
STotal For Sell Max Order
for (int b = 0; b < BTotal; b ++) { OrderSelect(b, SELECT_BY_POS, MODE_TRADES); if(OrderType() <= OP_SELL && OrderSymbol() == Symbol()) { IsTrade = True; if(OrderType() == OP_BUY) { } } }BTotal For Buy Max Order
STotal For Sell Max Order
This
if(OrderType() <= OP_SELL
says . . . if the order is a OP_BUY or OP_SELL, i.e. Buy or Sell . . . look at this: https://docs.mql4.com/constants/trading
Did you also change something here? This is a very weird OrderSelect and probably does not what it is planned to do, but might have in influence on continuing the code or not:
if (OrdersHistoryTotal()>0){ OrderSelect(OrdersHistoryTotal()-1, OP_BUY, MODE_HISTORY); if (OrderCloseTime() + 1410 > TimeCurrent()){ return(0); } } if (OrdersHistoryTotal()>0){ OrderSelect(OrdersHistoryTotal()-1, OP_SELL, MODE_HISTORY); if (OrderCloseTime() + 1410 > TimeCurrent()){ return(0); } }
Check OrderSelect().
Just wondering.. what is this good for:
if(IsTrade) { if(OrderType() == OP_BUY && OrderSymbol() == Symbol()) { }}
Maybe you should click the link phi.nuts has posted.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use