I am sorry, but I have no idea what you mean - maybe you can write it in your native
language and use an online translater and translate it to English? Try freetranslation.
com, translate.google.com or babelfish for example.
Hi, ThomasB.
I want to hold or save the big totals nombor in memory.
maybe i want write code example here.
buylimit drop 1 become buytotals.
buystop drop 1 also become buytotals.
mean buylimit and buystop drop don't activate, only buytotals activate.
and said thanks to reply
egt520
I want to hold or save the big totals nombor in memory.
maybe i want write code example here.
int _GetLastError = 0; for ( int z = _ OrdersTotal() - 1; z >= 0; z -- ) { if ( !OrderSelect( z, SELECT_BY_POS ) ) { _GetLastError = GetLastError(); Print( "OrderSelect( ", z, ", SELECT_BY_POS ) - Error #", _GetLastError ); continue; } if ( OrderMagicNumber() == magic && OrderSymbol() == Symbol() ) { switch ( OrderType() ) { case OP_BUY: BuyTotal ++; break; case OP_SELL: SellTotal ++; break; case OP_BUYLIMIT: BuyLimitTotal ++; break; case OP_SELLLIMIT: SellLimitTotal ++; break; case OP_BUYSTOP: BuyStopTotal ++; break; case OP_SELLSTOP: SellStopTotal ++; break; } } } // because i have total all type. i only want take Buytotal and selltotal decrease to activate true. // example all set take profit 20pip, Buytotal increase to 6 and drop 1 profit, now become 5 Buytotal // and how i write here become true? if( Buytotal > Buytotal ) <<<how here?? { for(int i=OrdersTotal()-1;i>=0;i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break; if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic && OrderType() == OP_BUY) { OrderClose(OrderTicket(),OrderLots(),Bid,3,CLR_NONE); } } return(0); }did you get what i mean here?
buylimit drop 1 become buytotals.
buystop drop 1 also become buytotals.
mean buylimit and buystop drop don't activate, only buytotals activate.
and said thanks to reply
egt520
I am sorry, but your English is too bad for me to understand it... Can't you just
do:
BuyTotal++; BuyStopTotal--;on the place where you want it? Try to use one of those translaters I put in my first post in this thread...
try this
int seq=BuyTotal, buybignumber, buysmallnumber; if(seq > buybignumber) { buybignumber=seq; } else { buysmallnumber=seq; } if( buybignumber> buysmallnumber) <<<how here?? { for(int i=OrdersTotal()-1;i>=0;i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break; if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic && OrderType() == OP_BUY) { OrderClose(OrderTicket(),OrderLots(),Bid,3,CLR_NONE); } } } return(0);
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
example buy total to increase..
3
4
5
6 << hold array this big nombor. when totals decrease to 0 and reset this nombor
5 drop 1 profit become 5 totals
and i can use this nombor for i use example below
if( big total > totals) true?
sorry for my english. wish you know what i mean. ^^
thanks
egt520