Forex



Go Back   Forex Trading > Training > Metatrader > Metatrader 4 mql 4 - Development course > Questions






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
 
Thread Tools Display Modes
  #1501 (permalink)  
Old 06-02-2009, 08:09 PM
Junior Member
 
Join Date: Apr 2008
Posts: 18
hipofiz is on a distinguished road
valuewhen and cross

HEllo,
There is a function in metastock ValueWhen (1,a,b)
How to code it mt4
And cross ( a,b) function in mt4?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1502 (permalink)  
Old 06-03-2009, 05:43 PM
Junior Member
 
Join Date: Oct 2007
Location: Kuching, Sarawak
Posts: 5
akmdbz is on a distinguished road
a very simple program

Hi all!

I am just a newbie in mql language so please bear with me.
My program logic is very simple. Daily timeframe. Open both buy and sell orders at the opening price of the candle. only closes orders base on 2 criteria, 1. when TP reached 2. When SL reached and when TP is set to disable, closes the order when the closing price reached for the day.

So any volunteer writing the above simple program? thanks for the help!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1503 (permalink)  
Old 06-11-2009, 03:40 PM
Junior Member
 
Join Date: Apr 2009
Posts: 5
faoni572 is on a distinguished road
Who will help us ?

I noticed so many questions in this thread even on this site begging for answers. How I wish we could get somebody to answer them because I really want to know MQL4
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1504 (permalink)  
Old 06-12-2009, 08:03 AM
Senior Member
 
Join Date: Apr 2008
Location: Rawalpindi
Posts: 106
arshadFX is on a distinguished road
Why not answers

I notice most seniors members are not answering ....... because the newbie questions are same and already answered so many times in these pages.
The newbie will not bother to read and explore all the forum they just need everything before "eye blink"
I red 100s of silly questions in forums which already answered
so please search your question i am sure there are 90% answers available of the questions which raises in newbies mind
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1505 (permalink)  
Old 06-25-2009, 02:01 AM
Junior Member
 
Join Date: Apr 2009
Posts: 4
einstr is on a distinguished road
order 0 failed to close. error: 4051

hello,

I have downloaded the divergence trader EA from the library and have been optimizing it and testing it in a demo acct for about three weeks. It appears to be working quite well but each time I switch to the live account, I get the error in the title in an alert window. I get this alert about every 20 seconds. It actually caused other orders that I had open at the time to close immediately upon the alert.

Could you please help me to find out what the issue is?

Thanks.
Rich
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1506 (permalink)  
Old 06-28-2009, 12:04 PM
Junior Member
 
Join Date: Jun 2009
Posts: 2
protagoras is on a distinguished road
Order book data

Hi,

I am very new in MetaTrader, but very interested if I can use order book data in my codes. If yes it would be great a simple sample code (or at least some keywords, built-in function names).

Thanks in advance,
prota
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1507 (permalink)  
Old 07-01-2009, 12:01 PM
Junior Member
 
Join Date: Jun 2009
Posts: 2
protagoras is on a distinguished road
MetaTrader and order book

Ok, I must say the "Ask" and "Bid" predefined variables stores the actually best orders... But what about the other levels and lots of the order book? Can I use these data in my code anyway?

Please help me, I searched a lot everywhere on the web but didnt find the answer.

prota
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1508 (permalink)  
Old 07-02-2009, 08:45 AM
Junior Member
 
Join Date: Apr 2006
Posts: 26
Ricx is on a distinguished road
One Fast question...

Dude if i do the bolded so i dont need to do the underlined right?

Quote:
if(Ask>=Line1)
{
posisi=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slipage, 0,0,"OneLineEA ver 1.0",Megic,0,Green);

if(OrderSelect(posisi,SELECT_BY_TICKET)==true)
{
posisi=OrderTicket();
}

}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1509 (permalink)  
Old 07-09-2009, 07:44 PM
Junior Member
 
Join Date: Jul 2009
Posts: 5
daylight is on a distinguished road
Please help me

HI codersguru

Thanks a lot FOR YOU
PLEASE CAN YOU EXPLAIN THIS STATMENT AND THE meaning

for(int shift = Bars-10; shift >= 0; shift--)
{
ExtMapBuffer1[shift] = ma[shift];
ExtMapBuffer2[shift] = ma[shift];
//Print (ma[shift]);
if (ma[shift] > ma[shift+1])
{
ExtMapBuffer1[shift] = EMPTY_VALUE;
ExtMapBuffer2[shift+1] = ma[shift+1];

}
else if (ma[shift] < ma[shift+1])
{
ExtMapBuffer2[shift] = EMPTY_VALUE;
ExtMapBuffer1[shift+1] = ma[shift+1];
}


IN THIS EA
//---- indicator settings
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Lime
#property indicator_color2 Red


//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[],ma[];

extern int MAType = 1;
extern int MAPeriod = 34;
extern int MAShift = 0;
extern int PriceType=0;

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- 2 additional buffers are used for counting.
IndicatorBuffers(5);

//---- drawing settings
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexBuffer(2,ma);
SetIndexStyle(0,DRAW_LINE,0,2);
SetIndexStyle(1,DRAW_LINE,0,2);


//---- initialization done
return(0);
}

int start()

{
for(int i = Bars-10; i >= 0; i--)
{
ma[i]=iMA(NULL,0,MAPeriod,MAShift,MAType,PriceType,i);
}

for(int shift = Bars-10; shift >= 0; shift--)
{
ExtMapBuffer1[shift] = ma[shift];
ExtMapBuffer2[shift] = ma[shift];
//Print (ma[shift]);
if (ma[shift] > ma[shift+1])
{
ExtMapBuffer1[shift] = EMPTY_VALUE;
ExtMapBuffer2[shift+1] = ma[shift+1];

}
else if (ma[shift] < ma[shift+1])
{
ExtMapBuffer2[shift] = EMPTY_VALUE;
ExtMapBuffer1[shift+1] = ma[shift+1];
}

}

return(0);
}
//+------------------------------------------------------------------+



thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1510 (permalink)  
Old 07-10-2009, 01:32 AM
Senior Member
 
Join Date: Oct 2008
Location: Vancouver, BC
Posts: 158
Roger09 is on a distinguished road
It's not EA, it's the indicator, which show you moments when "Moving Average" indicator goes up or down.
That code you need calculates last ten bars only.
Put it in /indicators directory and restart your terminal.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
forex, histogram, JMASlope, ToR 1.20, ZUP_v1.mq4

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 Off
Forum Jump


All times are GMT. The time now is 12:27 PM.



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