Custom indicator

 

I see that it is going to take some time to work the kinks out of my program. Can MQL writer be used to write a custom indicator to set off an alarm when conditions are met? Or is there another way to create a custom indicator.

The one I am wanting is:

EXP. Weighted MA (2) crossing over LWMA High (30) signalling an alarm.

At least by having this I can conduct actual trading while working on my program.

I did not get good educated answers as to how to do this from the customer service people at Interbankfx.

 

Can't help with exp weigthed because MT4 only has linear weigthed MA and exp MA.

if (iMA(NULL,0,2,0,MODE_EMA,PRICE_CLOSE,0)>iMA(NULL,0,30,0,MODE_LWMA,PRICE_HIGH,0)&&iMA(NULL,0,2,0,MODE_EMA,PRICE_CLOSE,1)<iMA(NULL,0,30,0,MODE_LWMA,PRICE_HIGH,1)) PlaySound("alert.wav");

Replace alert.wav with a path to a sound file of your choice

 

I appreciate what you have provided TraderSeven, but I do not have clue what to do with the statement. I know what it is supposed to do by the statement description, but what is always lacking is where to stick these statements. I tried using the fxfisherman compiler but metatrader does not like the sound phrase. I am not a programmer, although I have had programming through Cobol.

Last night out of frustration, I wrote an email to MetaGroup who provides this software and suggested highly they hire an excellent technical writer to convert their lousy documentation into a user friendly, informative and instructional documentation with examples of how each key word is used and step by step how to build an indicator or expert advisor. Quite frankly, their documentation provided by brokers is garbage to a laymen programmer. Programmers make poor technical writers!

What irks me is there is no schooling on this stuff available and it seems by the various forums that it is learned by asking thousands of questions. What a poor way to grasp this language.

Bottom line, I need clarification. If I email the brokerage firm for programming support, I get an email 3 - 4 days later. This is pitiful response time. How does anybody truly learn this MQL language????

 

MetaQuotes is extremely poor in term of support as I mentioned in Barriers that make MetaTrader unattractive to big brokers thread. Why their support is poor? Because most of their staffs are Russians who are mostly English illiteracy. I noticed a few staffs who can can speak and write English well in their MT4 forum last few months, but now they might have been fired already--they're just gone from the forum.

Back to the point, there is a very good tutorial on MQ4/MQH language at https://www.mql5.com/en/code. I'll be right back with the mql references.

 

Yes, I certainly have to agree with everyone's thoughts on MetaQuotes documentation as well as support.

A great many cries for help go left unanswered on their own forums, their staff often border on being rude (I guess that's the issue with poor English skills on their part), they seem resistant to implementing new features despite continual user feedback and they have never replied to any emails I've ever sent.

I really like Metatrader as a stable platform with a strong scripting backend but there'll come a day soon when a better one will come along by a company who listens to users. MetaQuotes will pay the price unfortunately.

Learning to program MQL? Yeah, join the club on the slow road to picking it up. It certainly isn't easy. The last time I coded was Assembly back in the Z80 days - it's taking me a while but I'm getting there slowly.

Cheers

Martin

 

Scorpion, any chance you could help me with this custom indicator with audible alerts. I have never programmed in such a low level language before. Like the previous person stated, he programmed in assembly language. Your Beta 1 compiler is the level I am used to program in.

The sad thing is all I want is a exponential weighted ma of 2 crossover over a lwma 30 (high) that sounds an audible alarm. Sounds like child play. I do not even know where to start the program - I take it as being in the Meta editor. From this point on, the stucture, the phrasing, the sounding of the alert is not clear at all. Can you help this ignorant MQL layman??

I wish somebody would ultimately clue me on a higher language to program this stuff in that can autotrade. Aspen Graphics Research FX software has such a language, and I know how to program it (formats similar to your compiler), but it does not autotrade (My primary purpose to programming). I am running out of time and money trying to get something autotrading. I feel like I will be dead and buried before I make sense of MQL.

 

Dave77,

Probably the better place for you to head over to is the Yahoo group MetaTrader_Experts_and_Indicators. There are a very helpful bunch and many will code difficult snippets/experts for no cost which is a great assistance to newbie MQL coders.

Cheers

Martin

 
Rastarr:
A great many cries for help go left unanswered on their own forums, their staff often border on being rude (I guess that's the issue with poor English skills on their part), they seem resistant to implementing new features despite continual user feedback

Their poor English skills are only a small part of the problem.

Even replies with 50 typos would make people happy.

They choose to not reply of give strange answers. They get many requests for other timebars so someone emailed them. He posted their answer on the MetaTrader forum. That answer was rude and very stupid from a busness point of view. Something like "we are not going to do it if you don't like it go elsewhere."

I wouldn't call myself an ace programmer but I can spot the diffrence between the programming languages. MQ4 certainly isn't userfriendly.

And it doesn't really look very powerfull either.

Why I'm here I hear you ask... Kinda accidently. I'm a long time stock trader that is widening his horizon. Forex looks easier to trade to me. The problem is that forex isn't widely supported yet. My broker offers 1-2 pip spreads + $2.50 commission. The problem is that the minimum lotsize is 25.

That's way to much for pyramiding and start trading forex.

As I wrote in the other thread the strong point of MT is that it's free. And perhaps more forex orientated than his big brothers.

https://www.mql5.com/go?link=http://www.amibroker.com released another broker interface. If they release a MT broker compatible interface I think MT will start to die. AmiBroker is not free but it's very well supported, has a lively community, tons of indicators. It's simply amazing how powerfull such a small program can be.

Changing the code between versions of MT (MQL MQ4) won't make users happy either.

 

TraderSeven, I don`t think that MT will die some near day. Simply becouse there are millions russian speaking people with money living in the ex USSR, hundreds of them are already trading forex ( how succesfully - i don`t know ) and thousaonds of them will be trying to trade in the nearest future, becouse it is getting more and more popular, but only 1% of them will be paying for software to trade( russian nature =) ). And how is the free russian based platform called? That s right - Metatrader.

As to foreign people, they must get some problems solved like this tech documentation, and customer support to be strong on the market.

 

Yes, MT is favourable to many russian traders as well as russian brokers. Personally, I think MT is not gonna say "ta ta" anytime soon. MetaQuotes might have got a strong support from USA-based companies recently, that's why they can divide some capital to develop MT4 until now, and the release date is 1st Jully. In return, MetaQuotes might have to do foreign companies a favour back, like the changes of MQ4 syntax and better doc in English. If MetaQuotes work on MT4 alone, they would choose to leave the MQL syntax intact, which would please their old clients. In short, MetaQuotes' strategy now is to expand the foreign market of their MT platform. If MetaQuotes has planed right, we will all see upcoming supports from big brokers.

Reason: