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.
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 !";
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;
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??
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
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.
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