UdangGalah
Active Member
- Messages
- 2,281
- Joined
- Jul 24, 2010
- Messages
- 2,281
- Reaction score
- 14
- Points
- 25
brp post??...
5 post..bole?
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.
brp post??...
5 post..bole?
//+------------------------------------------------------------------+
//|UdangGalah Multiple Buy 5x |
//|www.carigold.com |
//+------------------------------------------------------------------+
//------------------
#property copyright "UdangGalah Multiple Buy 5x"
#property link "www.carigold.com"
//user input
extern double Lots = 0.10;
extern int Slippage = 3;
extern int TP = 10;
extern int SL = 31;
extern bool isIBFXmini=false;
// globals
string mySymbol;
string postfix;
// trade management
double ask, bid, point;
string TradeComment="UdangGalah Multiple BUY";
int MagicNumber=12345678;
// used for verbose error logging
#include <stdlib.mqh>
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int init()
{
if(isIBFXmini) postfix="m";
mySymbol="Symbol()"+postfix; OpenPos("Buy");
mySymbol="Symbol()"+postfix; OpenPos("Buy");
mySymbol="Symbol()"+postfix; OpenPos("Buy");
mySymbol="Symbol()"+postfix; OpenPos("Buy");
mySymbol="Symbol()"+postfix; OpenPos("Buy");
}
int start() {}
//ENTRY LONG (buy, Ask)
void OpenPos(string Trade)
{
int gle=0;
int ticket=0;
int loopcount;
loopcount=0;
while(true)
{
bid=MarketInfo(Symbol(),MODE_BID);
ask=MarketInfo(Symbol(),MODE_ASK);
point=MarketInfo(Symbol(),MODE_POINT);
double TPBuy=0;
double SLBuy=0;
if(TP>0){TPBuy=ask+TP*point;}
if(SL>0){SLBuy=ask-SL*point;}
if (Trade=="Buy") ticket=OrderSend(Symbol(),OP_BUY,Lots,ask,Slippage ,SLBuy,TPBuy,TradeComment,MagicNumber ,White);
gle=GetLastError();
if(gle==0)
{
if (Trade=="Buy") Print("BUY PLACED Ticket="+ticket+" Ask="+ask+" Lots="+Lots);
break;
}
else
{
if (Trade=="Buy") Print("-----ERROR----- Placing BUY order: Lots="+Lots+" SL="+SL+" TP="+TP+" Bid="+bid+" Ask="+ask+" ticket="+ticket+" Err="+gle+" "+ErrorDescription(gle));
RefreshRates();
Sleep(500);
// give up after 10 tries (~5 seconds)
loopcount++;
if(loopcount>10)
{
if (Trade=="Buy") Print("-----ERROR----- Giving up on placing BUY order");
return(gle);
}
}
}
}
//+------------------------------------------------------------------+
//|UdangGalah Multiple Sell 5x |
//|www.carigold.com |
//+------------------------------------------------------------------+
//------------------
#property copyright "UdangGalah Multiple Sell 5x"
#property link "www.carigold.com"
//user input
extern double Lots = 0.10;
extern int Slippage = 3;
extern int TP = 10;
extern int SL = 31;
extern bool isIBFXmini =false;
// globals
string mySymbol;
string postfix;
// trade management
double ask, bid, point;
string TradeComment=" UdangGalah Multiple SELL ";
int MagicNumber=12345678;
// used for verbose error logging
#include <stdlib.mqh>
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int init()
{
if(isIBFXmini) postfix="m";
mySymbol="Symbol()"+postfix; OpenPos("Sell");
mySymbol="Symbol()"+postfix; OpenPos("Sell");
mySymbol="Symbol()"+postfix; OpenPos("Sell");
mySymbol="Symbol()"+postfix; OpenPos("Sell");
mySymbol="Symbol()"+postfix; OpenPos("Sell");
}
int start() {}
//ENTRY LONG (buy, Ask)
void OpenPos(string Trade)
{
int gle=0;
int ticket=0;
int loopcount;
loopcount=0;
while(true)
{
bid=MarketInfo(Symbol(),MODE_BID);
ask=MarketInfo(Symbol(),MODE_ASK);
point=MarketInfo(Symbol(),MODE_POINT);
double TPSell=0;
double SLsell=0;
if(TP>0){TPSell=bid-TP*point;}
if(SL>0){SLsell=bid+SL*point;}
if (Trade=="Sell") ticket=OrderSend(Symbol(),OP_SELL,Lots,bid,Slippage,SLsell,TPSell,TradeComment,MagicNumber,Red);
gle=GetLastError();
if(gle==0)
{
if (Trade=="Sell") Print("SELL PLACED Ticket="+ticket+" Bid="+bid+" Lots="+Lots);
break;
}
else
{
if (Trade=="Sell") Print("-----ERROR----- placing SELL order: Lots="+Lots+" SL="+SL+" TP="+TP+" Bid="+bid+" Ask="+ask+" ticket="+ticket+" Err="+gle+" "+ErrorDescription(gle));
RefreshRates();
Sleep(500);
// give up after 10 tries (~5 seconds)
loopcount++;
if(loopcount>10)
{
if (Trade=="Sell") Print("-----ERROR----- Giving up on placing SELL order");
return(gle);
}
}
}
}
yg ni buy 5 post
Code://+------------------------------------------------------------------+ //|UdangGalah Multiple Buy 5x | //|www.carigold.com | //+------------------------------------------------------------------+ //------------------ #property copyright "UdangGalah Multiple Buy 5x" #property link "www.carigold.com" //user input extern double Lots = 0.10; extern int Slippage = 3; extern int TP = 10; extern int SL = 31; extern bool isIBFXmini=false; // globals string mySymbol; string postfix; // trade management double ask, bid, point; string TradeComment="UdangGalah Multiple BUY"; int MagicNumber=12345678; // used for verbose error logging #include <stdlib.mqh> //+------------------------------------------------------------------+ //| script program start function | //+------------------------------------------------------------------+ int init() { if(isIBFXmini) postfix="m"; mySymbol="Symbol()"+postfix; OpenPos("Buy"); mySymbol="Symbol()"+postfix; OpenPos("Buy"); mySymbol="Symbol()"+postfix; OpenPos("Buy"); mySymbol="Symbol()"+postfix; OpenPos("Buy"); mySymbol="Symbol()"+postfix; OpenPos("Buy"); } int start() {} //ENTRY LONG (buy, Ask) void OpenPos(string Trade) { int gle=0; int ticket=0; int loopcount; loopcount=0; while(true) { bid=MarketInfo(Symbol(),MODE_BID); ask=MarketInfo(Symbol(),MODE_ASK); point=MarketInfo(Symbol(),MODE_POINT); double TPBuy=0; double SLBuy=0; if(TP>0){TPBuy=ask+TP*point;} if(SL>0){SLBuy=ask-SL*point;} if (Trade=="Buy") ticket=OrderSend(Symbol(),OP_BUY,Lots,ask,Slippage ,SLBuy,TPBuy,TradeComment,MagicNumber ,White); gle=GetLastError(); if(gle==0) { if (Trade=="Buy") Print("BUY PLACED Ticket="+ticket+" Ask="+ask+" Lots="+Lots); break; } else { if (Trade=="Buy") Print("-----ERROR----- Placing BUY order: Lots="+Lots+" SL="+SL+" TP="+TP+" Bid="+bid+" Ask="+ask+" ticket="+ticket+" Err="+gle+" "+ErrorDescription(gle)); RefreshRates(); Sleep(500); // give up after 10 tries (~5 seconds) loopcount++; if(loopcount>10) { if (Trade=="Buy") Print("-----ERROR----- Giving up on placing BUY order"); return(gle); } } } }
yg ni sell 5 post
Code://+------------------------------------------------------------------+ //|UdangGalah Multiple Sell 5x | //|www.carigold.com | //+------------------------------------------------------------------+ //------------------ #property copyright "UdangGalah Multiple Sell 5x" #property link "www.carigold.com" //user input extern double Lots = 0.10; extern int Slippage = 3; extern int TP = 10; extern int SL = 31; extern bool isIBFXmini =false; // globals string mySymbol; string postfix; // trade management double ask, bid, point; string TradeComment=" UdangGalah Multiple SELL "; int MagicNumber=12345678; // used for verbose error logging #include <stdlib.mqh> //+------------------------------------------------------------------+ //| script program start function | //+------------------------------------------------------------------+ int init() { if(isIBFXmini) postfix="m"; mySymbol="Symbol()"+postfix; OpenPos("Sell"); mySymbol="Symbol()"+postfix; OpenPos("Sell"); mySymbol="Symbol()"+postfix; OpenPos("Sell"); mySymbol="Symbol()"+postfix; OpenPos("Sell"); mySymbol="Symbol()"+postfix; OpenPos("Sell"); } int start() {} //ENTRY LONG (buy, Ask) void OpenPos(string Trade) { int gle=0; int ticket=0; int loopcount; loopcount=0; while(true) { bid=MarketInfo(Symbol(),MODE_BID); ask=MarketInfo(Symbol(),MODE_ASK); point=MarketInfo(Symbol(),MODE_POINT); double TPSell=0; double SLsell=0; if(TP>0){TPSell=bid-TP*point;} if(SL>0){SLsell=bid+SL*point;} if (Trade=="Sell") ticket=OrderSend(Symbol(),OP_SELL,Lots,bid,Slippage,SLsell,TPSell,TradeComment,MagicNumber,Red); gle=GetLastError(); if(gle==0) { if (Trade=="Sell") Print("SELL PLACED Ticket="+ticket+" Bid="+bid+" Lots="+Lots); break; } else { if (Trade=="Sell") Print("-----ERROR----- placing SELL order: Lots="+Lots+" SL="+SL+" TP="+TP+" Bid="+bid+" Ask="+ask+" ticket="+ticket+" Err="+gle+" "+ErrorDescription(gle)); RefreshRates(); Sleep(500); // give up after 10 tries (~5 seconds) loopcount++; if(loopcount>10) { if (Trade=="Sell") Print("-----ERROR----- Giving up on placing SELL order"); return(gle); } } } }
kalau ekau masuk bertanding dlm PR13 ni, konpom den vote![]()
yg ni Buy + TP=10 Sl=31
Code://+------------------------------------------------------------------+ //|hurairah01 | //|www.carigold.com | //+------------------------------------------------------------------+ //------------------ #property copyright "hurairah01" #property link "www.carigold.com" //user input extern double Lots = 0.10; extern int Slippage = 3; extern int TP = 10; extern int SL = 31; extern bool isIBFXmini=false; // globals string mySymbol; string postfix; // trade management double ask, bid, point; string TradeComment="hurairah01 BUY"; int MagicNumber=12345678; // used for verbose error logging #include <stdlib.mqh> //+------------------------------------------------------------------+ //| script program start function | //+------------------------------------------------------------------+ int init() { if(isIBFXmini) postfix="m"; mySymbol="Symbol()"+postfix; OpenPos("Buy"); ** int start() {** //ENTRY LONG (buy, Ask) void OpenPos(string Trade) { int gle=0; int ticket=0; int loopcount; loopcount=0; while(true) { bid=MarketInfo(Symbol(),MODE_BID); ask=MarketInfo(Symbol(),MODE_ASK); point=MarketInfo(Symbol(),MODE_POINT); double TPBuy=0; double SLBuy=0; if(TP>0){TPBuy=ask+TP*point;** if(SL>0){SLBuy=ask-SL*point;** if (Trade=="Buy") ticket=OrderSend(Symbol(),OP_BUY,Lots,ask,Slippage ,SLBuy,TPBuy,TradeComment,MagicNumber ,White); gle=GetLastError(); if(gle==0) { if (Trade=="Buy") Print("BUY PLACED Ticket="+ticket+" Ask="+ask+" Lots="+Lots); break; ** else { if (Trade=="Buy") Print("-----ERROR----- Placing BUY order: Lots="+Lots+" SL="+SL+" TP="+TP+" Bid="+bid+" Ask="+ask+" ticket="+ticket+" Err="+gle+" "+ErrorDescription(gle)); RefreshRates(); Sleep(500); // give up after 10 tries (~5 seconds) loopcount++; if(loopcount>10) { if (Trade=="Buy") Print("-----ERROR----- Giving up on placing BUY order"); return(gle); ** ** ** **
yg ni sell + TP=10 Sl=31
Code://+------------------------------------------------------------------+ //|hurairah01 | //|www.carigold.com | //+------------------------------------------------------------------+ //------------------ #property copyright "hurairah01" #property link "www.carigold.com" //user input extern double Lots = 0.10; extern int Slippage = 3; extern int TP = 10; extern int SL = 31; extern bool isIBFXmini =false; // globals string mySymbol; string postfix; // trade management double ask, bid, point; string TradeComment=" hurairah01 SELL "; int MagicNumber=12345678; // used for verbose error logging #include <stdlib.mqh> //+------------------------------------------------------------------+ //| script program start function | //+------------------------------------------------------------------+ int init() { if(isIBFXmini) postfix="m"; mySymbol="Symbol()"+postfix; OpenPos("Sell"); ** int start() {** //ENTRY LONG (buy, Ask) void OpenPos(string Trade) { int gle=0; int ticket=0; int loopcount; loopcount=0; while(true) { bid=MarketInfo(Symbol(),MODE_BID); ask=MarketInfo(Symbol(),MODE_ASK); point=MarketInfo(Symbol(),MODE_POINT); double TPSell=0; double SLsell=0; if(TP>0){TPSell=bid-TP*point;** if(SL>0){SLsell=bid+SL*point;** if (Trade=="Sell") ticket=OrderSend(Symbol(),OP_SELL,Lots,bid,Slippage,SLsell,TPSell,TradeComment,MagicNumber,Red); gle=GetLastError(); if(gle==0) { if (Trade=="Sell") Print("SELL PLACED Ticket="+ticket+" Bid="+bid+" Lots="+Lots); break; ** else { if (Trade=="Sell") Print("-----ERROR----- placing SELL order: Lots="+Lots+" SL="+SL+" TP="+TP+" Bid="+bid+" Ask="+ask+" ticket="+ticket+" Err="+gle+" "+ErrorDescription(gle)); RefreshRates(); Sleep(500); // give up after 10 tries (~5 seconds) loopcount++; if(loopcount>10) { if (Trade=="Sell") Print("-----ERROR----- Giving up on placing SELL order"); return(gle); ** ** ** **
masta, kenapa script ni sy xleh compile kat meta editoe?..dia kluar error
error tu tulih apo masta?..
*den bukannye tau bona.. kok dapek tolong den tolong..
byk sgt masta..x tau nak bg camne..leh x masta bg den yg mq4 & ex4 punya?
![]()
byk btul masalah... ce masta try ni..
nubiefx buy.mq4
nubiefx buy.ex4
nubiefx sell.mq4
nubiefx sell.ex4
*klu x bole masta jgn marah den ye...