unknown
Fun Poster
- Messages
- 293
- Joined
- Mar 12, 2007
- Messages
- 293
- Reaction score
- 0
- Points
- 10
for (int i=0; i<OrdersTotal(); i++) <---order total ni utk apa ye
bro aiman?
bro aiman?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.

OrderSelect(0, SELECT_BY_POS, MODE_TRADES); [COLOR="Gray"]// select pos pertama[/COLOR]
OrderSelect(1, SELECT_BY_POS, MODE_TRADES); [COLOR="gray"]// select pos ke 2[/COLOR]
OrderSelect(2, SELECT_BY_POS, MODE_TRADES); [COLOR="gray"]// select pos ke 3[/COLOR]
OrderSelect(.... [COLOR="gray"]// sampai 9 kali[/COLOR]
for (int i=0; i<OrdersTotal(); i++)
{
OrderSelect(i, SELECT_BY_POS, MODE_TRADES); [COLOR="gray"]// variable i di guna semula untuk select pos satu per satu ikut turutan[/COLOR]
for (int i=0; i<OrdersTotal(); i++)
{
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
string pairName = OrderSymbol();
double lotSize = OrderLots();
double takeProfit = OrderTakeProfit();
.......

oo camtu.. dan kenapa return tu kena ada (total)
}
return (total);
}
total ni mean total oder ke?
int TotalPos (int orderType) [COLOR="Gray"]// integer function[/COLOR]
{
int [COLOR="blue"]total[/COLOR]; [COLOR="gray"]// int variable[/COLOR]
....
return ([COLOR="blue"]total[/COLOR]); [COLOR="gray"]// mesti return integer[/COLOR]
}

Code:int TotalPos (int orderType) [COLOR="Gray"]// integer function[/COLOR] { int [COLOR="blue"]total[/COLOR]; [COLOR="gray"]// int variable[/COLOR] .... return ([COLOR="blue"]total[/COLOR]); [COLOR="gray"]// mesti return integer[/COLOR] }
ooo ok paham dah tq.. tak perasan aritu int total

salam bro aiman.. katakan saya ada 3 order dan tiga-tiga dah close.. ea boleh identify ke oder mana yg dah close? .
int start()
{
Comment("Jumlah position = "+OrdersTotal());
}