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?
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
<<
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;
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
doh I left out a parentheses at the end after bid
if(type=="UP") Alert (Symbol()," ",Period(), "Moving Average Cross UP @ "Bid);
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??
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
<<
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 lackingThanks, I will test it out.
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
ima dload it i told ya wrong by the way that one is coded. thats what ya get when u ask a dyslexic a code question

About 5 glasses of rum and cokes will straighten those eyes out!

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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!