Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > General Discussion


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-07-2007, 08:23 PM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 719
wolfe is on a distinguished road
Questions for programmers

Hello everyone,

I would like to start this thread, and have it be a place for anyone to go if they have a mq4 programming question or problem.

My hope is that ALL you expert programmers out there will attempt to answer any questions that anyone has posted in this thread.

There are many great programmers in this forum that seem happy to help people with their programming. The Ask thread started by Codersguru is one great place for people to go with questions.

If anyone has any coding questions, feel free to post them in this thread and hopefully one of the many great programmers will be happy to help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-07-2007, 08:30 PM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 719
wolfe is on a distinguished road
I would like to start this off with a coding question of my own.

I am writing an expert that involves opening many different pairs from one chart.

My question is this: We all know that your expert will only read through your code when an incoming tick happens in the chart that your expert is attached to. Is there a way to make your expert execute if there is an incoming tick from a different currency pair on a separate chart? I have not been able to figure out if this is possible. Thank you to anyone that has a solution for this problem.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-07-2007, 09:05 PM
Guyver's Avatar
Senior Member
 
Join Date: Mar 2006
Posts: 784
Blog Entries: 16
Guyver is on a distinguished road
Quote:
Originally Posted by wolfe View Post
I would like to start this off with a coding question of my own.

I am writing an expert that involves opening many different pairs from one chart.

My question is this: We all know that your expert will only read through your code when an incoming tick happens in the chart that your expert is attached to. Is there a way to make your expert execute if there is an incoming tick from a different currency pair on a separate chart? I have not been able to figure out if this is possible. Thank you to anyone that has a solution for this problem.

well if you like to see the code in action then please take a look at TSD EA's in Expert advisor section the new ones are trading all the currencies by attaching it to only in one chart.

hope this help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-07-2007, 09:26 PM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 719
wolfe is on a distinguished road
Quote:
Originally Posted by Guyver View Post
well if you like to see the code in action then please take a look at TSD EA's in Expert advisor section the new ones are trading all the currencies by attaching it to only in one chart.

hope this help
I know how to execute multi-currency trades from one chart. But does the code allow for the program to be executed if ANY of the currencies have a NEW tick, not JUST the tick from the chart your EA is attached to? If this has been programmed, can you give an example? Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-07-2007, 09:36 PM
Senior Member
 
Join Date: Feb 2006
Posts: 546
Michel is on a distinguished road
Quote:
Originally Posted by wolfe View Post
I know how to execute multi-currency trades from one chart. But does the code allow for the program to be executed if ANY of the currencies have a NEW tick, not JUST the tick from the chart your EA is attached to? If this has been programmed, can you give an example? Thanks!
Please, check this: A question for the MQ developers - how to trigger the tick? - Forex Trading Software Forum
I think you can have some small EA on each pair to trigger the main EA (or a DLL), but I never tried it.

Last edited by Michel; 07-07-2007 at 09:40 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-07-2007, 09:54 PM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 719
wolfe is on a distinguished road
Quote:
Originally Posted by Michel View Post
Please, check this: A question for the MQ developers - how to trigger the tick? - Forex Trading Software Forum
I think you can have some small EA on each pair to trigger the main EA (or a DLL), but I never tried it.
Thank you for the information. I'm not sure this will work, but I will try it. I just need a way to make the EA go through the int start() function if ANY tick comes in from ANY of the currencies my EA is managing. It seems there should be a piece of code you could write into the EA that would allow this to happen.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 07-07-2007, 10:21 PM
Senior Member
 
Join Date: Feb 2006
Posts: 546
Michel is on a distinguished road
Quote:
Originally Posted by wolfe View Post
Thank you for the information. I'm not sure this will work, but I will try it. I just need a way to make the EA go through the int start() function if ANY tick comes in from ANY of the currencies my EA is managing. It seems there should be a piece of code you could write into the EA that would allow this to happen.
Normally (ie without the use of PostMessage etc) the start() function of an EA is only called by a new tick of the pair which the EA is attached to.
So the EA is able to know if another pair has receive a new tick using MarketInfo() or iClose() etc, but this knowledge can only happen inside the start() func of the EA, ie when a new tick of the first pair arrives.
To be free of the triggering of the start() func, you can write an endless loop script which scan for sample every 100 ms the value given by MarketInfo() or better, some flag as GlobalVariables writen by small EAs attached to each pair.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 07-07-2007, 10:50 PM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 719
wolfe is on a distinguished road
Thank you michel, I will continue to work on this.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 07-08-2007, 06:37 PM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 719
wolfe is on a distinguished road
Maybe best to just attach EA to currency pair that is most active. GBPJPY? Could attach to most active pair whether I'm trading that pair or not just to get int start() to cycle more frequently.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


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
List of EA programmers JJLL Expert Advisors - Metatrader 4 101 Yesterday 01:02 PM
HMA - Calling All Programmers!! secxces Indicators - Metatrader 4 58 01-26-2008 10:19 PM
Question for programmers onelesstick General Discussion 2 10-27-2006 09:09 PM
I am throwing down my gauntlet to programmers jth Metatrader 4 2 10-23-2006 12:49 PM


All times are GMT. The time now is 07:05 AM.



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