Forex
Google
New signals service!

Go Back   Forex Trading > Metatrader Training > 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
 
LinkBack Thread Tools Display Modes
  #41 (permalink)  
Old 02-13-2008, 03:48 PM
Member
 
Join Date: May 2007
Posts: 40
gmax111 is on a distinguished road
EDIT: Never mind i have figured it out...
Attached Files
File Type: mq4 SuperSR7_breakout.mq4 (15.5 KB, 14 views)

Last edited by gmax111; 02-13-2008 at 08:02 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #42 (permalink)  
Old 02-13-2008, 11:15 PM
Junior Member
 
Join Date: Jan 2008
Location: Brooklyn
Posts: 22
bdht is on a distinguished road
Quote:
Originally Posted by omelette View Post
...the error are caused by price mis-matches between different timeframes - not really a problem unless you get loads of these. To get rid of them you would need to delete and re-generate the pairs that give problems, via the History center. Your TP question makes no sense.
Excellent. Thank you; couldn't you or anybody else point it earlier? Anyway, now I know what the problem is and will try to fix it. As for the TP question: you may actually disregard it b/c the EA should not post the TP value in MT4 since the EA isn't based on prediction; it should only perform the reversal when the crossing happens: either IND1 crosses its 0 level, or IND2's line1 crosses line2. Thanks again. I apologize if my question was that rhetorical or if the first sentence was a bit rude.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #43 (permalink)  
Old 02-24-2008, 04:48 AM
Member
 
Join Date: Oct 2006
Posts: 71
Big Be is on a distinguished road
To bdht

bdht
Your understanding of ticks is correct.
Regarding iIND2_line1, if it is a custom indicator, you must use iCustom().
else an MA- 'iMA' or other built in can be used.
Period must be at least 1, I believe.

TP is specified at order open or modify, and is automatic.

You can limit to one trade with: if OrdersTotal() ==0

Good luck.

Big Be
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #44 (permalink)  
Old 02-26-2008, 05:23 PM
Junior Member
 
Join Date: May 2007
Posts: 27
emulatore is on a distinguished road
EA to open order on multiple pairs

Hi guys, i was trying to use this EA to open orders on multiple pairs, but i get no luck, the Alert keeps saying that the other pairs cannot open the order because the price is invalid?

I used all search and knowledgement i have about mql4 but no luck to fix yet, can anybody give me a light?

Here is the code of start() function:
OrderSend("EURUSD",OP_SELL,0.1,MarketInfo("EURUSD" ,MODE_BID),5,0,MarketInfo("EURUSD",MODE_BID)-100*MarketInfo("EURUSD",MODE_POINT),"Hedge demo",MagicNumber,Red);
OrderSend("GBPUSD",OP_SELL,0.1,MarketInfo("GBPUSD" ,MODE_BID),5,0,MarketInfo("GBPUSD",MODE_BID)-100*MarketInfo("GBPUSD",MODE_POINT),"Hedge demo",MagicNumber,Red);
OrderSend("USDJPY",OP_SELL,0.1,MarketInfo("USDJPY" ,MODE_BID),5,0,MarketInfo("USDJPY",MODE_BID)-100*MarketInfo("USDJPY",MODE_POINT),"Hedge demo",MagicNumber,Red);
OrderSend("GBPJPY",OP_SELL,0.1,MarketInfo("GBPJPY" ,MODE_BID),5,0,MarketInfo("GBPJPY",MODE_BID)-100*MarketInfo("GBPJPY",MODE_POINT),"Hedge demo",MagicNumber,Red);


Let's say, i put the ea on EUR/USD, it open a sell only for EUR/USD, the other pairs alert me with "invalid price" error.

Thanks,
Thomas
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #45 (permalink)  
Old 04-11-2008, 01:26 PM
Member
 
Join Date: Apr 2007
Posts: 54
scalpmaster is on a distinguished road
How to halt other EAs when one is running in the same account?

Say I want to maximize my capital & time in the same account by having more than one EA attached but I do not want more than one to run which might blow up my account, is there a way to do it? Otherwise the account is just sitting there, waiting for only one EA signal to occur.

Once that EA has finished it's run(taken profit or stoploss), all attached EAs
becomes eligible again.

I know this is in the Magic Number Thread but besides Magic Number approach(which requires EA code modification),
there could be other approaches to do this. So, moderator, please do not move my post.

Last edited by scalpmaster; 04-11-2008 at 01:30 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #46 (permalink)  
Old 04-11-2008, 01:33 PM
Administrator
 
Join Date: Sep 2005
Posts: 16,816
Blog Entries: 145
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
I can be done by coding I think.
I will move your post to the thread where the members are replying on coding question and may be some decision can be done or simple tool can be coded.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #47 (permalink)  
Old 04-11-2008, 01:40 PM
Administrator
 
Join Date: Sep 2005
Posts: 16,816
Blog Entries: 145
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
Some decision can be found on this thread by coding: one order per Metatrader (per all the symbols) and so on.
Read this thread from the beginning.

As to separated tool for that so I remember one on some russian website but could find it now. If I find so I will post of course.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #48 (permalink)  
Old 04-11-2008, 05:37 PM
Member
 
Join Date: Apr 2007
Posts: 54
scalpmaster is on a distinguished road
Quote:
Originally Posted by newdigital View Post
.....If I find so I will post of course.
Please do,thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #49 (permalink)  
Old 04-12-2008, 01:15 AM
Linuxser's Avatar
Moderator
 
Join Date: May 2006
Location: Helliconia (Spring)
Posts: 3,322
Blog Entries: 46
Linuxser has disabled reputation
If free margin is not equal to balance itīs because some trade is running.Just write something like: if balance=free margin open order if not do nothing.

This is a condition, the EA will check this before open any trades.
__________________
Elite Manual Trading | Portfolio | Calendar | Suggestions to improve the forum | My Blog

Remember: Signatures must have three lines as maximum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #50 (permalink)  
Old 04-12-2008, 08:38 AM
Member
 
Join Date: Apr 2007
Posts: 54
scalpmaster is on a distinguished road
Quote:
Originally Posted by Linuxser View Post
If free margin is not equal to balance itīs because some trade is running.Just write something like: if balance=free margin open order if not do nothing.
This is a condition, the EA will check this before open any trades.
Good Idea. What is mq4 statement for do nothing?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
forex, trendenvelopes_v3

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
MT4 (Basic) Questions stepwise Metatrader 4 6 09-22-2008 03:22 AM
Basic Indicator Question waaustin Metatrader Programming 8 04-02-2008 03:54 PM
Need Help Understanding Basic MQL logic Emerald King Expert Advisors - Metatrader 4 7 02-27-2007 10:59 AM
Very basic coding help needed camisa Questions 1 05-08-2006 06:36 PM


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



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