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 (2) Thread Tools Display Modes
  #611 (permalink)  
Old 06-07-2007, 07:47 PM
Junior Member
 
Join Date: Nov 2006
Posts: 19
Drivefast is on a distinguished road
Question

Quote:
Originally Posted by ryanklefas
I think CodersGuru died or something. He hasn't been around in a while.

Anyway.... add this statement:

PlaySound("alert.wav");

.... where "alert.wav" is the name of the file that you want to play.
Thank you for responding to my post.

I am not sure about where to put PlaySound("alert.wav"); in the code.
Can I just delete this part? Alert("sFractals (", Symbol(), ", ", Period(), ") - BUY!!!");

Or, does it need to be something like this?
PrevSignal = 1;
PlaySound("alert.wav");
Alert("sFractals (", Symbol(), ", ", Period(), ") - BUY!!!");
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #612 (permalink)  
Old 06-07-2007, 08:37 PM
ryanklefas's Avatar
Senior Member
 
Join Date: Apr 2006
Location: USA
Posts: 439
ryanklefas is on a distinguished road
Yep. Just replace the entire alert with the sound.

Code:
  if(PrevSignal <= 0 )
      {
        if(ExtDownFractalsBuffer[SIGNAL_BAR] > 0)
          {
            PrevSignal = 1;
            PlaySound("alert.wav");
          }
      }
    if(PrevSignal >= 0)
      {
        if(ExtUpFractalsBuffer[SIGNAL_BAR] > 0)
          {
            PrevSignal = -1;
            PlaySound("alert.wav");
          }
      }
__________________
"Don't work harder, work smarter." -- my Java professor

Coder for Hire:
http://www.firecell-fx.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #613 (permalink)  
Old 06-08-2007, 12:23 AM
Junior Member
 
Join Date: Nov 2006
Posts: 19
Drivefast is on a distinguished road
Thank you ryanklefas for all your help it works just like I want it to now.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #614 (permalink)  
Old 06-08-2007, 08:06 AM
niva's Avatar
Senior Member
 
Join Date: Mar 2006
Posts: 101
niva is on a distinguished road
Ask about sorting

I have a data table, 2 dimensional, stored into a 2 dimensional array. I want to do some manipulation, such as sorting according to any column from that data table.

The ArraySort() function, in the instruction, can sort arrays on its 1st dimension. I don't see how that can works for me.

Any suggestions about data table sorting on MetaTrader?
__________________
Forex TSD is NO. 1
EA's blog: http://eaconfigs.blogspot.com/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #615 (permalink)  
Old 06-08-2007, 08:10 AM
Member
 
Join Date: May 2006
Posts: 32
veematics is on a distinguished road
Communication Betwen Expert Advisor

Hello,
i want to know if there's a way to communicate between expert advisor, let say i have EA A as main strategy
and backup EA B as backup strategy

i place it on 2 different pair..
i want to trigger if EA A are in drawdown position, start EA B...
when cummulative profit for EA A and EA B has reach some target point..

close all positions from EA A and EA B

is that possible to do ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #616 (permalink)  
Old 06-09-2007, 11:53 AM
ryanklefas's Avatar
Senior Member
 
Join Date: Apr 2006
Location: USA
Posts: 439
ryanklefas is on a distinguished road
Quote:
Originally Posted by veematics
Hello,
i want to know if there's a way to communicate between expert advisor, let say i have EA A as main strategy
and backup EA B as backup strategy

i place it on 2 different pair..
i want to trigger if EA A are in drawdown position, start EA B...
when cummulative profit for EA A and EA B has reach some target point..

close all positions from EA A and EA B

is that possible to do ?
I think global variables would be the thing you are looking for. You can check them out in the MetaEditor reference section. To view your current global variables, press F3 in the MT4 terminal.
__________________
"Don't work harder, work smarter." -- my Java professor

Coder for Hire:
http://www.firecell-fx.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #617 (permalink)  
Old 06-09-2007, 11:58 AM
ryanklefas's Avatar
Senior Member
 
Join Date: Apr 2006
Location: USA
Posts: 439
ryanklefas is on a distinguished road
Quote:
Originally Posted by niva
I have a data table, 2 dimensional, stored into a 2 dimensional array. I want to do some manipulation, such as sorting according to any column from that data table.

The ArraySort() function, in the instruction, can sort arrays on its 1st dimension. I don't see how that can works for me.

Any suggestions about data table sorting on MetaTrader?
Every standard array sorting function I have ever heard of only sorts the first dimension. You may have to create your own. Or check out advanced C++ sorting algorythms on the web if you have not tried that allready.
__________________
"Don't work harder, work smarter." -- my Java professor

Coder for Hire:
http://www.firecell-fx.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #618 (permalink)  
Old 06-12-2007, 11:03 AM
Junior Member
 
Join Date: Jun 2007
Posts: 3
Freedom FX is on a distinguished road
Multiple EAs using Multiple Accounts

Hello,

I am new to Metatrader4 (and fx trading). What I would like to know is whether it is possible to test multiple EAs using multiple demo accounts of the same deposit size using the same currency pair on the one Metatrader4 platform?

For example I have five different EAs one allocated each to their own demo account of $1000 each using only GBPUSD on the one platform so that I can compare their performance over a period of time.

When I tried to do this in my StrategyBuilder - Metatrader - Demo either I found that the EA installation from one account was carried forward when I logged into the next account or when disabled one EA on the carried forward account to install another EA the EA on the first account disabled.

I do realise that it is possible to have a different EA for different currency pairs in the same account but this does not enable me to compare the performance of various EAs to the same currency pair.

Is backtesting then my course of action. If so please provide some information on how to get started.

Many Thanks for any assistance.




Freedom FX
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #619 (permalink)  
Old 06-13-2007, 07:27 AM
ryanklefas's Avatar
Senior Member
 
Join Date: Apr 2006
Location: USA
Posts: 439
ryanklefas is on a distinguished road
Freedom FX,

Your active account is managed by whatever EAs are running in your terminal, so I don't think you can do what you are asking. You can however install multipkle copies of MT4 on your computer and run one of them for each of your demo accounts.
__________________
"Don't work harder, work smarter." -- my Java professor

Coder for Hire:
http://www.firecell-fx.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #620 (permalink)  
Old 06-13-2007, 10:44 PM
proverbs's Avatar
Member
 
Join Date: Jan 2007
Posts: 71
proverbs is on a distinguished road
Ryanklefas,
Here is code that enters pending orders based on the current price action (bid/ask)

My Question:
I am wanting this to enter the pending orders off the Daily pivot and not the current price.

Can you point me to some examples where I can try and figure this out or is there some high low pivot logic I can incorporate into this code then point to that as the reference instead of the bid/ask?

Thanks for your assistance.

Code:
}
    OrderSend(Symbol(),
              OP_BUYSTOP,
              lots,
              Ask+open_long*Point, // Spread included
              slippage,
              Bid+(open_long-stop_long)*Point,
              Bid+(open_long+take_profit)*Point,
              NULL,
              magic,
              0,
              FireBrick);

    OrderSend(Symbol(),
              OP_SELLSTOP,
              lots,
              Bid-open_short*Point,
              slippage,
              Ask-(open_short-stop_short)*Point,
              Ask-(open_short+take_profit)*Point,
              NULL,
              magic,
              0,
              FireBrick);
    clear_to_send = false;
  }
__________________
Proverbs [James]
Faith in Jesus helps me to see the invisible, believe the incredible and receive the impossible!
He makes all things new in my life.

Last edited by proverbs; 06-13-2007 at 11:07 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
histogram, forex, 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

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/questions/270-ask.html
Posted By For Type Date
OzFx System:) - Page 639 This thread Refback 06-21-2008 10:53 PM
Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart This thread Refback 12-08-2007 12:46 PM


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



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