Forex
Google
New signals service!

Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-17-2008, 05:52 AM
Junior Member
 
Join Date: Apr 2008
Posts: 15
npantzos is on a distinguished road
Please help me!!!!

I have a expert advisor, but not working MaxOpenTime eatch position....why?

Whati is rong... please help me
thanks
A ea is heare..
Attached Files
File Type: mq4 King_EA(EURGBP-M1,ALPARI)demo.mq4 (4.9 KB, 23 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-17-2008, 09:59 AM
Junior Member
 
Join Date: Apr 2008
Posts: 15
npantzos is on a distinguished road
please help me......
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-17-2008, 10:49 AM
Junior Member
 
Join Date: Jun 2008
Posts: 1
boszz is on a distinguished road
Demo?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-17-2008, 02:45 PM
tcl's Avatar
tcl tcl is offline
Member
 
Join Date: Apr 2008
Posts: 55
tcl is on a distinguished road
Smile

try to input the MaxOpenTime parameter with number greater than 10

is it help??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-17-2008, 05:17 PM
Junior Member
 
Join Date: Apr 2008
Posts: 15
npantzos is on a distinguished road
No!!!

the code is rong.........
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-18-2008, 05:46 AM
Junior Member
 
Join Date: Apr 2008
Posts: 15
npantzos is on a distinguished road
someone TO correct...???

Someone to correct code this ea.
Not working
extern int MaxOpenTime_BUY = 10;
extern int MaxOpenTime_SELL = 10;
something is rong.....
plz
Attached Files
File Type: mq4 King_EA(EURGBP-M1,ALPARI)v01.mq4 (4.9 KB, 11 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 07-18-2008, 08:22 AM
tcl's Avatar
tcl tcl is offline
Member
 
Join Date: Apr 2008
Posts: 55
tcl is on a distinguished road
Quote:
Originally Posted by npantzos View Post
Someone to correct code this ea.
Not working
extern int MaxOpenTime_BUY = 10;
extern int MaxOpenTime_SELL = 10;
something is rong.....
plz
have you tried to input the parameter greater than 10 ??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 07-18-2008, 09:22 AM
Senior Member
 
Join Date: Jul 2007
Posts: 145
roodstaart is on a distinguished road
Quote:
Originally Posted by tcl View Post
have you tried to input the parameter greater than 10 ??

Just skip the lines with the if statement:
if(MaxOpenTime_BUY>0)
if(MaxOpenTime_SELL>0)
Then it will trade. But as this is a common rsi scalper, I doubt that it will be profitable for the long run.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 07-23-2008, 01:11 PM
Junior Member
 
Join Date: Apr 2008
Posts: 15
npantzos is on a distinguished road
............

can you help me,.........?


correct the ea
Attached Files
File Type: mq4 King_EA(EURGBP-M1,ALPARI)v01.mq4 (4.9 KB, 9 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 07-24-2008, 02:34 AM
Junior Member
 
Join Date: Apr 2008
Posts: 3
elijahsmithklime is on a distinguished road
I need help ...

I need help in getting the following codes to an EA i tried my best but i could not finish it please is there anyone that can help me out ?

I am trying to compile the EA using MACD plus 6 and 12 close period Exponential Moving average for my signal manually via a multi time frame of 4 hours, 1 hour and 15 minutes chart as follows :

BUY POSITION : Once the MACD on 4 hours, 1 hour and 15 minutes chart confirms a positive divergence and the 6 close period EMA crosses the 12 close period EMA upwards on the 15 minutes chart, that gives a sure BUY signal with Take Profit of nothing less than 50 Pips for the trade.

SELL POSITION : Once the MACD on 4 hours, 1 hour and 15 minutes chart confirms a negative divergence and the 6 close period EMA crosses the 12 close period EMA downwards on the 15 minutes chart, that gives a sure SELL signal with Take Profit of nothing less than 50 Pips for the trade.

You will add a trailing stop of 25 pips. I use FXOPEN, FG TRADER, ALPARI, FXDD and IBFX.

I mainly trade GBP/JPY and EUR/USD. All i could code is bellow, please help me out in correcting and completing it :

Code:
//+------------------------------------------------------------------+
//|                                                       elkeys.mq4 |
//|                        Copyright © 2008, millenium invetments ng |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2008, millenium invetments ng"
#property link      "http://www.metaquotes.net"

//---- input parameters
extern double    TakeProfit=350.0;
extern double    Lots=0.1;
extern double    TrailingStop=35.0;
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }int Crossed(double line 1, double line 2)
  
  {
  static int last_direction = 0;
  static int current_dirction = 0;
  if(line1>line2)current_dirction = 1; //up
  if(line1<line2)current_dirction = 2; //down
  if(current_dirction != last_direction) //changed
  {
  last_direction = current_dirction;

  return (last_direction);
  }
  else
  {
  return (0);
  }
  }
   
  
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----
int cnt, ticket, total;

double shortEma, longEma;

if(Bars<100)
{

Print("bars less than 100");

return(0);

}

if(TakeProfit<10)
{

Print("TakeProfit less than 10");

return(0); // check TakeProfit

}

shortEma = iMA(NULL,0,8,0,MODE_EMA,PRICE_CLOSE,0); 
longEma = iMA(NULL,0,13,0,MODE_EMA,PRICE_CLOSE,0);
int isCrossed = Crossed (shortEma,longEma);
total = OrdersTotal();

if(total < 1)

{

if(isCrossed == 1)
{

ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+TakeProfit*Point,

"My EA",12345,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);
}

if(isCrossed == 2)

{

ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,

Bid-TakeProfit*Point,"My EA",12345,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);
}

for(cnt=0;cnt<total;cnt++)

{

OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);

if(OrderType()<=OP_SELL && OrderSymbol()==Symbol())

{

if(OrderType()==OP_BUY) // long position is opened

{

// should it be closed?

if(isCrossed == 2)
{

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(isCrossed == 1)

{

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);

}
  
//----
   return(0);
  }
//+------------------------------------------------------------------+
int cnt, ticket, total;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:19 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.