ALL SIMPLE AND SOME CODING WILL PUBLISH HERE

Offline
03-25-2011, 12:57 AM,
#1
* NO COPYRIGHT
*SO SIMPLE CODING CAN BE USED FOR ALL TRADERS



P/S UPDATE NEXT........................
Change is not always for the better. Change can make things worse.Beware of Greeks bearing gifts.Beware of politicians who make promises.
sapa2 daftar tak dapat pass...guna email yg sama hantaq send ke wangolds@wangolds.com harap maklum yer
41.Dalam penulisan ini pun saya sendiri di gelak oleh orang lain kerana mengkaji apa yg telah dikaji oleh profesor profesor universiti kita. “Wuyooo rajin nyaa nak menulis… / ek elee,, ko kaji laaa benda lain… / weii.. ko dapat duit ke tulis camni? / buang masa la bro… bukan boleh kaya ponnn…”
42.Biar saya jawab… lemahnya bangsa kita kerana kita tidak mahu atau tidak suka menulis. Jika kita menulis, sekurang kurangnya anak cucu kita ada bahan untuk dikaji dan dibaca.
43.Agar tidak hilang sejarah bangsa. U all tk nak baca, takpelah.. tapi untuk anak anak saya bila besar nanti… wahh ni kajian bapak kita dulu… nak baca hasil profesor universiti, grenti tak dapat baca.
Offline
04-08-2011, 02:00 AM,
#2
//===========================COUNT ORDER/PENDING ORDER FUNCTION=====================

OpenBuyOrders=0;
OpenSellOrders=0;
OpenBuy_Stop_Orders=0;
OpenSell_Stop_Orders=0;
total=0;
total_Stop=0;


for(int i=0;i<OrdersTotal(); i++ )
{

if(OrderSelect(i, SELECT_BY_POS)==true)
if (OrderSymbol() != Symbol()) continue;
{
if (OrderType()==OP_BUY)
OpenBuyOrders++;
if (OrderType()==OP_SELL)
OpenSellOrders++;
if (OrderType()==OP_BUYSTOP)
OpenBuy_Stop_Orders++;
if (OrderType()==OP_SELLSTOP)
OpenSell_Stop_Orders++;
}
total=OpenBuyOrders + OpenSellOrders;
total_Stop= OpenBuy_Stop_Orders + OpenSell_Stop_Orders;
}
Comment ( " \n" + "\n" +
" ",sideway,"\n" +
" buy=",OpenBuyOrders," sell=",OpenSellOrders," total=",total,"\n" +
" buy Stop =",OpenBuy_Stop_Orders," sell Stop = ",OpenSell_Stop_Orders," total stop = ",total_Stop,"\n\n\n" +
" Email: pemburu_strategi@yahoo.com\n",
" http://www.wangolds.com\n\n",
" " );

}



//================================LAST ORDER PROFIT FUNCTION ============================

int LastOrderProfit(int Magic)
{
int profit = 0;
datetime dt = 0;

int cnt = HistoryTotal();
for (int i=0; i < cnt; i++) {
if (!OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)) continue;
if (OrderSymbol() != Symbol()) continue;
if (OrderMagicNumber() != Magic) continue;
if (OrderCloseTime() > dt) {
dt = OrderCloseTime();
profit = OrderProfit();
}
}
return (profit);
}

//====================================COUNT ORDER PROFIT FUNCTION =============================================

int CountOrders(int Magic)
{
int count=0;
int i;
int total=OrdersTotal();
for(i=0;i<total;i++)
{
OrderSelect(i,SELECT_BY_POS,MODE_TRADES);

if(OrderSymbol()!=Symbol() || OrderMagicNumber() != Magic)
continue;

if(OrderType()>OP_SELL)continue;
count++;
}
return(count);
}


//===========================================ORDERS TOTAL FUNCTION ================================================
int MyOrdersTotal(int Magic)
{
int c=0;
int total = OrdersTotal();
for (int cnt = 0 ; cnt < total ; cnt++)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol())
{
c++;
}
}
return©;
}


//======================================DELETE PENDING ORDERS FUNCTION ===============================================

int DeletePendingOrders(int Magic)
{
int total = OrdersTotal();
for (int cnt = total-1 ; cnt >= 0 ; cnt--)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol() && (OrderType()!=OP_BUY || OrderType()!=OP_SELL))
{
OrderDelete(OrderTicket());
}
}
return(0);
}

//=======================================CLOSE ORDERS FUNCTION ================================================

int CloseOrders(int Magic)
{
int total = OrdersTotal();
for (int cnt = total-1 ; cnt >= 0 ; cnt--)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol())
{
if (OrderType()==OP_BUY)
{
OrderClose(OrderTicket(),OrderLots(),Bid,4 );
}
if (OrderType()==OP_SELL)
{
OrderClose(OrderTicket(),OrderLots(),Ask,4);
}
}
}
return(0);
}

//========================================GET LAST BUY PRICE FUNCTION==============================================

double GetLastBuyPrice(int Magic)
{
int total=OrdersTotal()-1;
for (int cnt = total ; cnt >=0 ; cnt--)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol() && (OrderType()==OP_BUYLIMIT|| OrderType()==OP_BUY))
{
LotBeli=OrderLots();
return(OrderOpenPrice());
break;
}
}
return(0);
}

//=========================================GET LAST SELL PRICE FUNCTION==============================================
double GetLastSellPrice(int Magic)
{
int total=OrdersTotal()-1;
for (int cnt = total ; cnt >=0 ; cnt--)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol() && (OrderType()==OP_BUYLIMIT||OrderType()==OP_SELL))
{
LotJual=OrderLots();
return(OrderOpenPrice());
break;
}
}
return(100000);
}


//+------------------------------------------------------------------+
kekasih ku di bawa lari mat bangla.. gelak
Offline
05-06-2011, 08:33 PM,
#3
cikit pon aku xpaham camner nak baca benda ni semua cry
"hargailah rezeki yg diperolehi walaupun hanya sebesar zarah,
kerana padanya terdapat berkat yg xdapat kita lihat..."


Offline
05-07-2011, 01:07 AM,
#4
(05-06-2011, 08:33 PM)talong Wrote: cikit pon aku xpaham camner nak baca benda ni semua cry

pelan2 kayuh
Change is not always for the better. Change can make things worse.Beware of Greeks bearing gifts.Beware of politicians who make promises.
sapa2 daftar tak dapat pass...guna email yg sama hantaq send ke wangolds@wangolds.com harap maklum yer
41.Dalam penulisan ini pun saya sendiri di gelak oleh orang lain kerana mengkaji apa yg telah dikaji oleh profesor profesor universiti kita. “Wuyooo rajin nyaa nak menulis… / ek elee,, ko kaji laaa benda lain… / weii.. ko dapat duit ke tulis camni? / buang masa la bro… bukan boleh kaya ponnn…”
42.Biar saya jawab… lemahnya bangsa kita kerana kita tidak mahu atau tidak suka menulis. Jika kita menulis, sekurang kurangnya anak cucu kita ada bahan untuk dikaji dan dibaca.
43.Agar tidak hilang sejarah bangsa. U all tk nak baca, takpelah.. tapi untuk anak anak saya bila besar nanti… wahh ni kajian bapak kita dulu… nak baca hasil profesor universiti, grenti tak dapat baca.
Offline
05-07-2011, 08:12 AM,
#5
(04-08-2011, 02:00 AM)Gogo Wrote: //===========================COUNT ORDER/PENDING ORDER FUNCTION=====================

OpenBuyOrders=0;
OpenSellOrders=0;
OpenBuy_Stop_Orders=0;
OpenSell_Stop_Orders=0;
total=0;
total_Stop=0;


for(int i=0;i<OrdersTotal(); i++ )
{

if(OrderSelect(i, SELECT_BY_POS)==true)
if (OrderSymbol() != Symbol()) continue;
{
if (OrderType()==OP_BUY)
OpenBuyOrders++;
if (OrderType()==OP_SELL)
OpenSellOrders++;
if (OrderType()==OP_BUYSTOP)
OpenBuy_Stop_Orders++;
if (OrderType()==OP_SELLSTOP)
OpenSell_Stop_Orders++;
}
total=OpenBuyOrders + OpenSellOrders;
total_Stop= OpenBuy_Stop_Orders + OpenSell_Stop_Orders;
}
Comment ( " \n" + "\n" +
" ",sideway,"\n" +
" buy=",OpenBuyOrders," sell=",OpenSellOrders," total=",total,"\n" +
" buy Stop =",OpenBuy_Stop_Orders," sell Stop = ",OpenSell_Stop_Orders," total stop = ",total_Stop,"\n\n\n" +
" Email: pemburu_strategi@yahoo.com\n",
" \n\n",
" " );

}



//================================LAST ORDER PROFIT FUNCTION ============================

int LastOrderProfit(int Magic)
{
int profit = 0;
datetime dt = 0;

int cnt = HistoryTotal();
for (int i=0; i < cnt; i++) {
if (!OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)) continue;
if (OrderSymbol() != Symbol()) continue;
if (OrderMagicNumber() != Magic) continue;
if (OrderCloseTime() > dt) {
dt = OrderCloseTime();
profit = OrderProfit();
}
}
return (profit);
}

//====================================COUNT ORDER PROFIT FUNCTION =============================================

int CountOrders(int Magic)
{
int count=0;
int i;
int total=OrdersTotal();
for(i=0;i<total;i++)
{
OrderSelect(i,SELECT_BY_POS,MODE_TRADES);

if(OrderSymbol()!=Symbol() || OrderMagicNumber() != Magic)
continue;

if(OrderType()>OP_SELL)continue;
count++;
}
return(count);
}


//===========================================ORDERS TOTAL FUNCTION ================================================
int MyOrdersTotal(int Magic)
{
int c=0;
int total = OrdersTotal();
for (int cnt = 0 ; cnt < total ; cnt++)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol())
{
c++;
}
}
return©;
}


//======================================DELETE PENDING ORDERS FUNCTION ===============================================

int DeletePendingOrders(int Magic)
{
int total = OrdersTotal();
for (int cnt = total-1 ; cnt >= 0 ; cnt--)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol() && (OrderType()!=OP_BUY || OrderType()!=OP_SELL))
{
OrderDelete(OrderTicket());
}
}
return(0);
}

//=======================================CLOSE ORDERS FUNCTION ================================================

int CloseOrders(int Magic)
{
int total = OrdersTotal();
for (int cnt = total-1 ; cnt >= 0 ; cnt--)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol())
{
if (OrderType()==OP_BUY)
{
OrderClose(OrderTicket(),OrderLots(),Bid,4 );
}
if (OrderType()==OP_SELL)
{
OrderClose(OrderTicket(),OrderLots(),Ask,4);
}
}
}
return(0);
}

//========================================GET LAST BUY PRICE FUNCTION==============================================

double GetLastBuyPrice(int Magic)
{
int total=OrdersTotal()-1;
for (int cnt = total ; cnt >=0 ; cnt--)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol() && (OrderType()==OP_BUYLIMIT|| OrderType()==OP_BUY))
{
LotBeli=OrderLots();
return(OrderOpenPrice());
break;
}
}
return(0);
}

//=========================================GET LAST SELL PRICE FUNCTION==============================================
double GetLastSellPrice(int Magic)
{
int total=OrdersTotal()-1;
for (int cnt = total ; cnt >=0 ; cnt--)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if (OrderMagicNumber() == Magic && OrderSymbol()==Symbol() && (OrderType()==OP_BUYLIMIT||OrderType()==OP_SELL))
{
LotJual=OrderLots();
return(OrderOpenPrice());
break;
}
}
return(100000);
}


//+------------------------------------------------------------------+

Salam.
Ader error la TT.
Coding ader yg missing.

PELUANG SESUAI UNTUK TRADE TIDAK DATANG SETIAP MASA
Offline
05-07-2011, 10:47 AM,
#6
(05-07-2011, 08:12 AM)Akulascalper Wrote: Salam.
Ader error la TT.
Coding ader yg missing.

ye betul kod tak lengkap
ambo silap tak letak cara guna function
kekasih ku di bawa lari mat bangla.. gelak
Offline
05-07-2011, 11:00 AM,
#7
(05-07-2011, 10:47 AM)Gogo Wrote: ye betul kod tak lengkap
ambo silap tak letak cara guna function

kasi la lengkap masta tt..cian super newbies nak study ehehehehhhe
Change is not always for the better. Change can make things worse.Beware of Greeks bearing gifts.Beware of politicians who make promises.
sapa2 daftar tak dapat pass...guna email yg sama hantaq send ke wangolds@wangolds.com harap maklum yer
41.Dalam penulisan ini pun saya sendiri di gelak oleh orang lain kerana mengkaji apa yg telah dikaji oleh profesor profesor universiti kita. “Wuyooo rajin nyaa nak menulis… / ek elee,, ko kaji laaa benda lain… / weii.. ko dapat duit ke tulis camni? / buang masa la bro… bukan boleh kaya ponnn…”
42.Biar saya jawab… lemahnya bangsa kita kerana kita tidak mahu atau tidak suka menulis. Jika kita menulis, sekurang kurangnya anak cucu kita ada bahan untuk dikaji dan dibaca.
43.Agar tidak hilang sejarah bangsa. U all tk nak baca, takpelah.. tapi untuk anak anak saya bila besar nanti… wahh ni kajian bapak kita dulu… nak baca hasil profesor universiti, grenti tak dapat baca.



Users browsing this thread: 1 Guest(s)
Komen: 6 <<>> Dilihat: 2682
ALL SIMPLE AND SOME CODING WILL PUBLISH HERE
astrowan
2167
Forum Jump: