|
|||||||
| 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 |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Quote:
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 <><< |
|
||||
|
Quote:
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 |
|
||||
|
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 Last edited by lowphat : 06-29-2006 at 02:32 AM. |
|
||||
|
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 <><< |
|
||||
|
Quote:
Thanks, I will test it out. |
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help Needed To Change Indicator Display | MMRPS | Digital Filters | 5 | 01-03-2008 09:42 AM |
| Chart display in MT4 | oneprint | Metatrader 4 | 4 | 11-07-2006 04:48 PM |
| I Trend Display | 006 | Metatrader 4 | 6 | 08-22-2006 12:52 PM |
| Can an EA display Indicators? | FXGamer | Metatrader 4 | 1 | 05-19-2006 06:06 PM |