Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,081 members, 7,811,029 topics. Date: Saturday, 27 April 2024 at 09:12 PM

I Want To Code Forex Robot. - Software/Programmer Market - Nairaland

Nairaland Forum / Science/Technology / Programming / Software/Programmer Market / I Want To Code Forex Robot. (4045 Views)

Arduino Robot Kit For Sale (13k) Negotiatable / WP Robot 3.62 - Latest Version / Mt4 Or Mql Programmers Wanted To Modify A Forex Robot (2) (3) (4)

(1) (Reply) (Go Down)

I Want To Code Forex Robot. by onward101: 7:20am On Nov 13, 2007
Hello everyone here,

Please I would want to know anyone who can help to programme Forex Expert Advisor (Robot) for me.

The programmer should have idea of forex trading.

The programming should base on C++ language.

Please I need it urgently, if anyone can do it he should contact me at browbel@yahoo.com. or call 08052460384

The type of indicator to programme the EA is Moving Average crossing.

Thanks.
Re: I Want To Code Forex Robot. by onward101: 7:32am On Nov 13, 2007
the coding is similar to the one below.

//+------------------------------------------------------------------+
//| MACD Sample.mq4 |
//| Copyright © 2005, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+

extern double TakeProfit = 50;
extern double Lots = 0.1;
extern double TrailingStop = 30;
extern double MACDOpenLevel=3;
extern double MACDCloseLevel=2;
extern double MATrendPeriod=26;

//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start()
{
double MacdCurrent, MacdPrevious, SignalCurrent;
double SignalPrevious, MaCurrent, MaPrevious;
int cnt, ticket, total;
// initial data checks
// it is important to make sure that the expert works with a normal
// chart and the user did not make any mistakes setting external
// variables (Lots, StopLoss, TakeProfit,
// TrailingStop) in our case, we check TakeProfit
// on a chart of less than 100 bars
if(Bars<100)
{
Print("bars less than 100"wink;
return(0);
}
if(TakeProfit<10)
{
Print("TakeProfit less than 10"wink;
return(0); // check TakeProfit
}
// to simplify the coding and speed up access
// data are put into internal variables
MacdCurrent=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0);
MacdPrevious=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1);
SignalCurrent=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,0);
SignalPrevious=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,1);
MaCurrent=iMA(NULL,0,MATrendPeriod,0,MODE_EMA,PRICE_CLOSE,0);
MaPrevious=iMA(NULL,0,MATrendPeriod,0,MODE_EMA,PRICE_CLOSE,1);

total=OrdersTotal();
if(total<1)
{
// no opened orders identified
if(AccountFreeMargin()<(1000*Lots))
{
Print("We have no money. Free Margin = ", AccountFreeMargin());
return(0);
}
// check for long position (BUY) possibility
if(MacdCurrent<0 && MacdCurrent>SignalCurrent && MacdPrevious<SignalPrevious &&
MathAbs(MacdCurrent)>(MACDOpenLevel*Point) && MaCurrent>MaPrevious)
{
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+TakeProfit*Point,"macd sample",16384,0,Green);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice());
}
else Print("Error opening BUY order : ",GetLastError());
return(0);
}
// check for short position (SELL) possibility
if(MacdCurrent>0 && MacdCurrent<SignalCurrent && MacdPrevious>SignalPrevious &&
MacdCurrent>(MACDOpenLevel*Point) && MaCurrent<MaPrevious)
{
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,Bid-TakeProfit*Point,"macd sample",16384,0,Red);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("SELL order opened : ",OrderOpenPrice());
}
else Print("Error opening SELL order : ",GetLastError());
return(0);
}
return(0);
}
// it is important to enter the market correctly,
// but it is more important to exit it correctly,
for(cnt=0;cnt<total;cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if(OrderType()<=OP_SELL && // check for opened position
OrderSymbol()==Symbol()) // check for symbol
{
if(OrderType()==OP_BUY) // long position is opened
{
// should it be closed?
if(MacdCurrent>0 && MacdCurrent<SignalCurrent && MacdPrevious>SignalPrevious &&
MacdCurrent>(MACDCloseLevel*Point))
{
OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet); // close position
return(0); // exit
}
// check for trailing stop
if(TrailingStop>0)
{
if(Bid-OrderOpenPrice()>Point*TrailingStop)
{
if(OrderStopLoss()<Bid-Point*TrailingStop)
{
OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderTakeProfit(),0,Green);
return(0);
}
}
}
}
else // go to short position
{
// should it be closed?
if(MacdCurrent<0 && MacdCurrent>SignalCurrent &&
MacdPrevious<SignalPrevious && MathAbs(MacdCurrent)>(MACDCloseLevel*Point))
{
OrderClose(OrderTicket(),OrderLots(),Ask,3,Violet); // close position
return(0); // exit
}
// check for trailing stop
if(TrailingStop>0)
{
if((OrderOpenPrice()-Ask)>(Point*TrailingStop))
{
if((OrderStopLoss()>(Ask+Point*TrailingStop)) || (OrderStopLoss()==0))
{
OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderTakeProfit(),0,Red);
return(0);
}
}
}
}
}
}
return(0);
}
// the end.



The template can seen from www.metaquotes. net

Please I need reply urgently.
Re: I Want To Code Forex Robot. by miquest: 1:43am On Nov 18, 2007
contact miquest05@yahoo.com
for all the codes u can get on Forex robots
Re: I Want To Code Forex Robot. by sweetpawn: 9:59am On Jun 01, 2011
Whats wrong with the code that you posted? (and how did u manage not to get banned for it?)
Re: I Want To Code Forex Robot. by sweetpawn: 10:00am On Jun 01, 2011
Whats wrong with the code that you posted? (and how did u manage not to get banned for it?)
Re: I Want To Code Forex Robot. by watsen23: 11:38am On Jun 25, 2011
Hi
ForexTrading.com offers online leveraged trading in the world's most liquid currency pairs, index and commodity CFDs. We aim to be the trading account of choice for traders who don't want to pay extra for the frills.
Re: I Want To Code Forex Robot. by omokay01: 3:34am On Jun 29, 2011
Am also interested in starting online forex. Who can suggests whch forex site that pays?
Re: I Want To Code Forex Robot. by ga082003: 9:58am On Mar 07, 2012
Check C3X one of the best performing portolios out there with solid charts and analysis to back the trades. Also the live trade room is among the best if you want to learn from good traders

http://www.Capital3x.com
Re: I Want To Code Forex Robot. by avosoft: 8:57pm On Mar 08, 2012
Bots?

(1) (Reply)

*?* Get Professional Website (peer-peer, Jumia/konga Type, Forum, Olx, Etc)** / Payroll Software Review: Accounting Software For Small Business In Nigeria / Create Us A Facebook Video Downloader For Android For #75,000

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 21
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.