Forex



Go Back   Forex Trading > Discussion Areas > General Discussion
Forex Forum Register More recent Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 06-29-2006, 12:50 AM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 398
iscuba11 is on a distinguished road
Exclamation Help needed with alert display function!

The alert does not include what currency pair moving average crossed over. How do I correct this code to pickup and identify the currency pair name like USDJPY in the alert display??


//----------------------- ALERT ON MA CROSS
//----------------------- SOURCE : FIREDAVE
void subCrossAlert(string type)
{
string AlertComment;

if(type=="UP") AlertComment = "Moving Average Cross UP !";
if(type=="DOWN") AlertComment = "Moving Average Cross DOWN !";

Alert(AlertComment);
PlaySound(SoundFilename);
}

//----------------------- END FUNCTION

Your help is much appreciated! Thanks in advance!
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
  #2 (permalink)  
Old 06-29-2006, 12:58 AM
increase's Avatar
Senior Member
 
Join Date: May 2006
Posts: 845
increase is on a distinguished road
Guru guys jump on me from a great height if I am wrong, but isn't it this

,Symbol(),"-",Period()

Where symbol is pair and period is timeframe?
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
  #3 (permalink)  
Old 06-29-2006, 01:13 AM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 398
iscuba11 is on a distinguished road
Cool

Quote:
Originally Posted by increase
Guru guys jump on me from a great height if I am wrong, but isn't it this

,Symbol(),"-",Period()

Where symbol is pair and period is timeframe?

I tried it this way - Came up with a bunch of errors.

if(type=="UP") AlertComment = "Moving Average Cross UP !", Symbol(),"-",Period();

Maybe I set it up wrong - Please advise.

Dave
<><<
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
  #4 (permalink)  
Old 06-29-2006, 02:14 AM
lowphat's Avatar
Senior Member
 
Join Date: Sep 2005
Posts: 200
lowphat is on a distinguished road
this is whut i use
Alert (Symbol()," ",Period(), "Phats Dirty Little Secret @ "Bid);
so maybe u would do something like
if(type=="UP") Alert (Symbol()," ",Period(), "Moving Average Cross UP @ "Bid;

Last edited by lowphat; 06-29-2006 at 02:16 AM.
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
  #5 (permalink)  
Old 06-29-2006, 02:41 AM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 398
iscuba11 is on a distinguished road
Cool

Quote:
Originally Posted by lowphat
this is whut i use
Alert (Symbol()," ",Period(), "Phats Dirty Little Secret @ "Bid);
so maybe u would do something like
if(type=="UP") Alert (Symbol()," ",Period(), "Moving Average Cross UP @ "Bid;

Here us what it looks like now. Now I get the error: 'end_of_program' unbalanced left parenthesis. Very frustrating!

//----------------------- ALERT ON MA CROSS
//----------------------- SOURCE : FIREDAVE
void subCrossAlert(string type)
{
string AlertComment;

//if(type=="UP") AlertComment = "Moving Average Cross UP !";
//if(type=="DOWN") AlertComment = "Moving Average Cross DOWN !";
if(type=="UP") Alert (Symbol()," ", Period(), "Moving Average Cross UP @ "Bid;

Alert(AlertComment);
PlaySound(SoundFilename);
}

//----------------------- END FUNCTION
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
  #6 (permalink)  
Old 06-29-2006, 02:44 AM
lowphat's Avatar
Senior Member
 
Join Date: Sep 2005
Posts: 200
lowphat is on a distinguished road
doh I left out a parentheses at the end after bid

if(type=="UP") Alert (Symbol()," ",Period(), "Moving Average Cross UP @ "Bid);
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
  #7 (permalink)  
Old 06-29-2006, 03:01 AM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 398
iscuba11 is on a distinguished road
Smile

Thanks Lowphat, it came up with an error referring to the bid but I really do not need that in the statement. I just wanted to be alerted to which of the 4 currencies crossed over and what direction. There is a couple other errors in the program I need to address yet.

Since I got your attention. How do you start and stop a program to trade (7 GMT to 18 GMT)? Another part lacking in the Universal MA program.

extern string
Time_Parameters = "---------- EA Active Time";
extern bool
UseHourTrade = false;
extern int
StartHour = 10,
EndHour = 11;


//----------------------- TIME FILTER
if (UseHourTrade)
{
if(!(Hour()>=StartHour && Hour()<=EndHour))
{
Comment("Non-Trading Hours!");
return(0);
}
}

All FireDave has in this program is a comment statement. How do I start and stop the program from trading??
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
  #8 (permalink)  
Old 06-29-2006, 03:20 AM
lowphat's Avatar
Senior Member
 
Join Date: Sep 2005
Posts: 200
lowphat is on a distinguished road
go to properties and see if you can set UseHourTrade to =TRUE
I believe if you want to use GMT and your MT company is using gmt you can just put in the hours you want it to trade
StartHour 7
EndHour 18
in properties
if your charts are not based in GMT you have to calculate the shift
by the code you pasted it dont appear to be lacking
lemem get the source and look at it for the cross i told ya wrong for the way the alerts are coded there

Last edited by lowphat; 06-29-2006 at 03:32 AM.
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
  #9 (permalink)  
Old 06-29-2006, 03:31 AM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 398
iscuba11 is on a distinguished road
Unhappy

Guess what Lowphat, the alert fired, but the symbol never showed up in the display - Darn It! This language stinks to work with. Someone needs to create tons of examples of how to do various things in this language. It is one step up from Assembly Language. Most people are probably to young to remember the nightmare of Assembly Language (20+ years ago). This is close to it.

if(type=="UP") Alert (Symbol()," ", Period(), "Moving Average Cross UP !");
if(type=="DOWN") Alert (Symbol()," ", Period(), "Moving Average Cross DOWN !");

If you or anyone come up with something that works to display the currency pair in the alert display window, I would appreciate it.

Dave
<><<
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
  #10 (permalink)  
Old 06-29-2006, 03:32 AM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 398
iscuba11 is on a distinguished road
Quote:
Originally Posted by lowphat
go to properties and see if you can set UseHourTrade to =TRUE
I believe if you want to use GMT and your MT company is using gmt you can just put in the hours you want it to trade
StartHour 7
EndHour 18
in properties
if your charts are not based in GMT you have to calculate the shift
by the code you pasted it dont appear to be lacking

Thanks, I will test it out.
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


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Help Needed To Change Indicator Display MMRPS Digital Filters 5 01-03-2008 10:42 AM
Chart display in MT4 oneprint Metatrader 4 4 11-07-2006 05:48 PM
I Trend Display 006 Metatrader 4 6 08-22-2006 01:52 PM
Can an EA display Indicators? FXGamer Metatrader 4 1 05-19-2006 07:06 PM


All times are GMT. The time now is 10:02 AM.



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