Forex
Google
New signals service!

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


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

View Poll Results: Would you like to see all the lessons have been gathered in one ebook?
Yes! 1,648 96.77%
No! 10 0.59%
Dosen't matter! 45 2.64%
Voters: 1703. You may not vote on this poll

Reply
 
LinkBack (106) Thread Tools Display Modes
  #71 (permalink)  
Old 09-05-2007, 01:05 AM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 704
wolfe is on a distinguished road
Quote:
Originally Posted by MQL4 View Post
I have spent many hours trying to figure out this code:


if (MODE_ASK==121.10)
{
ticket=OrderSend(Symbol()......................... .................

I want it to buy usd/jpy on 121.10. What is the problem?

Also, can someone please write me a code syntax that can buy at a certain time?

Thank You.
I may be wrong, but have you simply tried:

if (Ask==121.10)
{
ticket=OrderSend(Symbol()......................... .................
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #72 (permalink)  
Old 09-15-2007, 05:54 AM
AQUILEZ's Avatar
Member
 
Join Date: Jul 2006
Posts: 64
AQUILEZ is on a distinguished road
Deal with error's

I am still get in OrderModify error 1 with a new buil 208-210

stringo says
You must insert into your source parameters checking before ModifyOrder function calling.

is this true? i don't trust this guy.

Best Regards
Aquilez

cnt=OrdersTotal()-1;
while(cnt>=0)
{
if(OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES)==fal se) break;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber) // && Reversed==False)
{
Print("Ticket ",OrderTicket()," modified.");
if (OrderType()==OP_SELL)
{
if (ExitWithOpenOrdersBasedON && myOrderTypetmp==2)
{
PreviousOpenOrders=OpenOrders+1;
ContinueOpening=False;
text = text +"\nClosing all orders .";
Print("Closing all orders.");
//return(0)
}
if (TrailingStop>0)
{
if ((OrderOpenPrice()-OrderClosePrice())>=(TrailingStop*Point+Pips*Point ))
{
if (OrderStopLoss()>(OrderClosePrice()+TrailingStop*P oint))
{
result=OrderModify(OrderTicket(),OrderOpenPrice(), OrderClosePrice()+TrailingStop*Point,OrderClosePri ce()-TakeProfit*Point-TrailingStop*Point,0,Purple);
if(result!=TRUE) Print("LastError = ", GetLastError());
else OrderPrint();
return(0);
}
}
}
}

if (OrderType()==OP_BUY)
{
if (ExitWithOpenOrdersBasedON && myOrderTypetmp==1)
{
PreviousOpenOrders=OpenOrders+1;
ContinueOpening=False;
text = text +"\nClosing all orders.";
Print("Closing all orders.");
//return(0);
}
if (TrailingStop>0)
{
if ((OrderClosePrice()-OrderOpenPrice())>=(TrailingStop*Point+Pips*Point) )
{
if (OrderStopLoss()<(OrderClosePrice()-TrailingStop*Point))
{
result=OrderModify(OrderTicket(),OrderOpenPrice(), OrderClosePrice()-TrailingStop*Point,OrderClosePrice()+TakeProfit*Po int+TrailingStop*Point,0,ArrowsColor);
if(result!=TRUE) Print("LastError = ", GetLastError());
else OrderPrint();
return(0);
}
}
}
}
}
cnt--;
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #73 (permalink)  
Old 09-16-2007, 07:48 AM
Junior Member
 
Join Date: Sep 2007
Posts: 2
fiaraz is on a distinguished road
Smile newbie

thankyou for the intro.. maybe a few years since you created it but still very useful.

regards

fiaraz
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #74 (permalink)  
Old 09-19-2007, 12:09 AM
Junior Member
 
Join Date: Nov 2006
Posts: 13
efmelp is on a distinguished road
Help Needed - Requires an EA Expert

Hello,

I was wondering if anyone can help me - Am making an EA using a custom indicator called " slope-direction-line.mq4 " the indicator represent trend by 2 colors Lime for uptrend and Red for downtrend - So how to identify the EA for Sell or Buy according to the two colors . I have tried the following but it is not working - So if you can help me please do.
PHP Code:
 if (iCustom(NULL0"slope-direction-line",0) < iCustom(NULL0"slope-direction-line",0)) 
and here is the link for the indicator http://www.forex-tsd.com/attachments...ction-line.mq4

Thanks in advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #75 (permalink)  
Old 09-25-2007, 11:19 AM
Junior Member
 
Join Date: Jun 2007
Posts: 1
mohd_alharthy is on a distinguished road
Hi codersguru i need help on EA

i have good basic knowledge on MT and MQL4

what i need to do is making a trading expert depends on 3 EMA's

this is traslated via google language tools
orignal link =
█▓▒░ █▓▒░ -

translated link=
Translated version of http://www.arabictrader.com/vb/showthread.php?t=33126


the scenarios i got them from Arabic trader forum site (property of bo7a)

the logic is as follows







First: components





(1) Hart Abu Alandal Efrem pm


(2) three Movenjat (Moving EMA 90 & 15 & 7)


(3) the levels seen any S (RSI (14), levels 35, 40, 55, 58)



Second: Modus Operandi


Small opportunities:



Purchase: at the intersection Moveng 7 with 15 Moveng up and be Alar ABS any level above 55.



Goal 75 points.


Sales: at the intersection Moveng 7 with 15 Moveng downs and the Alar ABS any level under 40.
Goal 75 points.




Major opportunities:


Purchase: at the intersection Moveng 7, 15 and 90 with Moveng be Alar ABS any level above 58.



The goal of 150 points.


Sales: at the intersection Moveng 7, 15 and 90 with Moveng be Alar ABS any level under 35.


The goal of 150 points.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #76 (permalink)  
Old 01-06-2008, 06:38 PM
Junior Member
 
Join Date: Jan 2008
Posts: 1
miraclee is on a distinguished road
Thanks a lot.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #77 (permalink)  
Old 01-26-2008, 03:06 AM
Junior Member
 
Join Date: Dec 2007
Posts: 8
Spanar is on a distinguished road
Thanks A Lot to Coderguru, NewDigital and all friends for teaching me very usefull education, hope some day with all my afford, i will make my own new Mql program. God Bless you all

Regard,

Spanar.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #78 (permalink)  
Old 01-30-2008, 07:59 AM
Junior Member
 
Join Date: May 2006
Posts: 5
yenpok is on a distinguished road
how to pass color parameter

dear sir,
I have a problem :how to pass the parameter to user difine function :

example :
CreateObject("Test1",Green);
CreateObject("Test2",C'236,130,0')
CreateObject("Test3",32768 )

void CreateObject(string Name1,int DefineColor)
{
ObjectCreate(Name1,OBJ_LABLEL,WindowFind("Indicato r1"),0,0);
ObjectSetText(Name1,"Testing",12,"Arial Bold:,DefineColor);

1. so how to pass the Color for Green, C'235,130,0,' or 32768

2. in the User define function, what is the type of the color? can be string ? int? double or color ? I have try but failed

3. what is the type variable for color, or can be convert from interger, string into color type variable ?

4. can you show me the url for this kind of problem.

thanks for the help

rgds bob
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #79 (permalink)  
Old 03-13-2008, 11:03 AM
Junior Member
 
Join Date: Aug 2007
Posts: 18
mercury_man is on a distinguished road
help.....help.........help...............help

hi
can you help me to use this indicator code

Quote:
iMAOnArray(?????,?????,?????,????,??????,i);
please with example

thank you for you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #80 (permalink)  
Old 03-13-2008, 01:25 PM
Linuxser's Avatar
Moderator
 
Join Date: May 2006
Location: Helliconia (Spring)
Posts: 2,820
Blog Entries: 34
Linuxser has disabled reputation
Quote:
Originally Posted by mercury_man View Post
hi
can you help me to use this indicator code



please with example

thank you for you
Hello,

I've moved your post to this thread. Take a look at posts 20#.

Meanwhile:

Quote:
double iMAOnArray( double array[], int total, int period, int ma_shift, int ma_method, int shift)Calculation of the Moving Average on data stored in a numeric array. Unlike iMA(...), the iMAOnArray function does not take data by symbol name, timeframe, the applied price. The price data must be previously prepared. The indicator is calculated from left to right. To access to the array elements as to a series array (i.e., from right to left), one has to use the ArraySetAsSeries function. Parameters:
array[] - Array with data. total - The number of items to be counted. 0 means whole array. period - Averaging period for calculation. ma_shift - MA shift ma_method - MA method. It can be any of the Moving Average method enumeration value. shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago). Sample:
double macurrent=iMAOnArray(ExtBuffer,0,5,0,MODE_LWMA,0);
double macurrentslow=iMAOnArray(ExtBuffer,0,10,0,MODE_LWM A,0);
double maprev=iMAOnArray(ExtBuffer,0,5,0,MODE_LWMA,1);
double maprevslow=iMAOnArray(ExtBuffer,0,10,0,MODE_LWMA,1 );
//----
if(maprev<maprevslow && macurrent>=macurrentslow)
Alert("crossing up");
__________________
Elite Manual Trading | Portfolio | Calendar | Suggestions to improve the forum | My Blog

Remember: Signatures must have three lines as maximum

Last edited by Linuxser; 03-13-2008 at 01:28 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
mql4 course, MQL4 TRAINING


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

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/metatrader-4-mql-4-development-course/134-welcome-mql4-course.html
Posted By For Type Date
where to learn the scripting language? Post #0 Refback 09-13-2008 11:45 AM
ewS҃X Post #0 Refback 09-10-2008 06:30 AM
yMT4zMetaTrader Part9y^g[_[z Post #0 Refback 08-19-2008 03:04 AM
yMT4zMetaTrader Part8y^g[_[z Post #0 Refback 08-17-2008 12:49 PM
??????MetaTrader????????????? - MetaTrader???Wiki Post #0 Refback 08-17-2008 08:53 AM
yuXzMetaTraderSҐpQyƂpz Post #20 Refback 08-02-2008 04:59 AM
where to learn the scripting language? Post #20 Refback 07-27-2008 10:16 PM
MT4MetaTrader Part11ڥ᥿ȥ졼 - MetaTraderޤȤWiki Post #20 Refback 07-07-2008 03:30 AM
yMT4zMetaTrader Part11y^g[_[z Post #20 Refback 07-06-2008 08:30 AM
yuXzMetaTraderSҐpQyƂpz Post #20 Refback 07-03-2008 05:05 PM
ewS҃X Post #20 Refback 07-03-2008 10:04 AM
Automating Forex trading - HotStockMarket Message Boards - Penny Stocks | Stock Tips This thread Refback 07-02-2008 04:07 PM
MT4MetaTrader Part12ڥ᥿ȥ졼 - MetaTraderޤȤWiki Post #20 Refback 06-20-2008 05:09 PM
Strategie i Systemy Forex This thread Refback 06-06-2008 03:51 PM
MQ4 Systemy Forex This thread Refback 06-05-2008 05:23 PM
Experts Advisors ? Comment a marche ? - Forum Eole Trading Ltd Post #20 Refback 05-02-2008 02:56 PM
Jom Buat Ea Dan Robot Sendiri!!!! - Page 2 - CariGold Forum This thread Refback 04-02-2008 05:23 AM
Jom Buat Ea Dan Robot Sendiri!!!! - Page 2 - CariGold Forum This thread Refback 03-31-2008 11:07 AM
Jom Buat Ea Dan Robot Sendiri!!!! - CariGold Forum This thread Refback 03-31-2008 04:59 AM
faire appel a des indicateurs programmes dans un Expert - Forum Eole Trading Ltd Post #20 Refback 03-30-2008 08:16 PM
faire appel a des indicateurs programmes dans un Expert - Forum Eole Trading Ltd Post #20 Refback 03-19-2008 08:31 PM
aKiToSHi's bookmarks on del.icio.us This thread Refback 03-14-2008 01:25 AM
Programmation indicateur mq4 - Forum Eole Trading Ltd This thread Refback 03-13-2008 07:06 AM
Programmation indicateur mq4 - Forum Eole Trading Ltd This thread Refback 03-13-2008 04:56 AM
发现了一个学MT4编程的好地方 - 「火线图书馆」 - 『火线投资论坛』 外汇,外汇入门,外汇论坛,外汇社区,外汇保证金,外汇交易,投资,投资论坛,A股,股票 Post #20 Refback 03-11-2008 12:53 PM