Download MetaTrader 5

Discussion of article "Marvel Your MQL5 Customers with a Usable Cocktail of Technologies!"

To add comments, please log in or register
How to buy a product in MetaTrader AppStore? Read the article!
MetaQuotes Software Corp.
Moderator
181422
MetaQuotes Software Corp. 2013.10.18 10:49 

New article Marvel Your MQL5 Customers with a Usable Cocktail of Technologies! has been published:

MQL5 provides programmers with a very complete set of functions and object-oriented API thanks to which they can do everything they want within the MetaTrader environment. However, Web Technology is an extremely versatile tool nowadays that may come to the rescue in some situations when you need to do something very specific, want to marvel your customers with something different or simply you do not have enough time to master a specific part of MT5 Standard Library. Today's exercise walks you through a practical example about how you can manage your development time at the same time as you also create an amazing tech cocktail.

Figure 5. jQuery dialog

Author: Jordi Bassaganas

Ivan Negreshniy
12756
Ivan Negreshniy 2013.10.31 19:13  
Thanks for the interesting article.
I hope author will not condemn a small usability improvements of this example. I did this with help of Hlaiman engine, slightly modified file news-watcher-csv.txt in attachment. Added functions of detecting terminals installed on the computer and saving a news calendar in CSV format in the data folder of terminal that was selected by user.


Terminal select

Changes in news-watcher-csv.html:

Initialization of Hlaiman engine, detection terminals on the user's computer, creation of the corresponding interface elements.


var hlaim_app = new ActiveXObject("hlaim.Application");
if(hlaim_app != null) {
        var hlaim_plugin = hlaim_app.LoadModuleObject("mt45.dll");
        var hlaim_terminals = document.getElementById("base-terminal");
        if(hlaim_plugin && hlaim_plugin.TerminalsCount > 0 && hlaim_terminals)
        for(i = 0; i < hlaim_plugin.TerminalsCount; i++) {
                var new_term = document.createElement("option");
                if(new_term) {
                        new_term.text = hlaim_plugin.Terminals[i];
                        new_term.value = i;
                        hlaim_terminals.add(new_term);
                }
        }
}
Small changes in the Ok: function()


Ok: function() {
var fso, f1, ht; 
        fso = new ActiveXObject("Scripting.FileSystemObject");
        ht = document.getElementById("base-terminal");
        if(fso && ht) {
                csv_term = new String(ht.options[ht.selectedIndex].text);
                csv_path = csv_term.slice(0, csv_term.indexOf("terminal")) +
                "MQL5\\files\\news_watcher.csv";
                f1 = fso.CreateTextFile(csv_path, true); 
                f1.Write (csv);
                fso = null;
        }  
        $( this ).dialog( "close" );
}
Interface element to select terminal


<div class="form-field">
        <label>Select terminal:</label>
        <select id="base-terminal">
        </select>
</div>
*The HTML5 code has been validated through the W3C Markup Validation Service. In order for this example to work you need to install Hlaiman EA Generator. To learn more about Hlaiman EA Generator read the article Creating Neural Network EAs Using MQL5 Wizard and Hlaiman EA Generator.

Possibilities of Hlaiman engine allow to MQL developers fully leverage the power of web technologies in their applications. Such usable cocktail of technologies can be used, for example, to create complex, multiterminal, cross-platform expert advisors.
Files:
Jordi Bassaganas
3528
Jordi Bassaganas 2013.10.31 22:27  

Thank you for your improvement,

Any extension is welcome, that's the idea! We can use web technology in our MQL5 developments to create cross-platform software. I take this opportunity to make a comment, however.

In general, JavaScript code should not use ActiveX controls for security issues, because malicious software writers could write ActiveX programs to get into the user's windows system. Your customers should trust you in order for you to do something like that, and you should clearly explain them that you are using ActiveX to run certain functions, etc.

Of course, you can use ActiveX for your own use, interacting with your Windows as you want.

More info here, as an example:

http://entertainment.howstuffworks.com/activex-for-animation3.htm

http://articles.winferno.com/web-browser-security/dangers-of-activex/

HowStuffWorks "Problems with ActiveX"
HowStuffWorks "Problems with ActiveX"
  • Dave Roos
  • entertainment.howstuffworks.com
The same things that make ActiveX so useful -- its flexibility and integration between all applications -- make it particularly dangerous in the hands of malicious hackers. Many of the past decade's most infamous computer viruses, spyware and adware programs came disguised as ActiveX controls. The problem with ActiveX, security experts say, is...
Ivan Negreshniy
12756
Ivan Negreshniy 2013.11.01 21:18  
Thank you for the remark. Indeed, ActiveX, as well as other Microsoft internet technologies, may be used for viruses distribution. Same situation is observed in other solutions for communication, such as Google etc. Of course, the main distributor of viruses today is the Internet.

From this point of view, most of the similar tasks would be much safer to solve in a local text editor. And it would be safer to 100% on a typewriter. And instead of a computer would be better to use calculator ;). But this, unfortunately, would affect on usability.

But I think we should not worry too much about this, because the fight against viruses carried by special anti-virus programs and sites. It only remains to protect our clients in MetaTrader environment, where the risk to a lesser extent regard to viruses, but to a greater extent regard to Forex trading.
Jordi Bassaganas
3528
Jordi Bassaganas 2013.11.03 00:38  
hlaiman:
Thank you for the remark. Indeed, ActiveX, as well as other Microsoft internet technologies, may be used for viruses distribution. Same situation is observed in other solutions for communication, such as Google etc. Of course, the main distributor of viruses today is the Internet.

From this point of view, most of the similar tasks would be much safer to solve in a local text editor. And it would be safer to 100% on a typewriter. And instead of a computer would be better to use calculator ;). But this, unfortunately, would affect on usability.

But I think we should not worry too much about this, because the fight against viruses carried by special anti-virus programs and sites. It only remains to protect our clients in MetaTrader environment, where the risk to a lesser extent regard to viruses, but to a greater extent regard to Forex trading.
Well, I think that the remark about ActiveX must be done. I like the idea of cross-platform EAs, but Web users must be aware that ActiveX may be dangerous.

That said, if your customers trust you, you can use ActiveX. You can put a dialog box explaining users very well what your app does, asking them to accept that your app needs to run certain functions to properly work, etc.

IMHO, I think that web technology can help you to complement some of your MQL5 developments without using ActiveX, in a very secure way.
Ivan Negreshniy
12756
Ivan Negreshniy 2013.11.04 18:39  
laplacianlab:
Well, I think that the remark about ActiveX must be done. I like the idea of cross-platform EAs, but Web users must be aware that ActiveX may be dangerous.

That said, if your customers trust you, you can use ActiveX. You can put a dialog box explaining users very well what your app does, asking them to accept that your app needs to run certain functions to properly work, etc.

IMHO, I think that web technology can help you to complement some of your MQL5 developments without using ActiveX, in a very secure way.

I want to remind that the DDE/OLE/ActiveX/COM/DCOM is an evolution of Microsoft technologies of inter-program interaction. These technologies are supported by almost all Windows applications and services. These technologies are the basis of .Net

Therefore, complete abandonment of ActiveX technology is equivalent to the complete abandonment of Windows OS, and consequently of all programs written for Windows, such as MetaTrader Terminals and MetaEditor IDE.

To better explain the subject of our discussion, I will give an example of life. We know that viruses infect people by moving through airborne droplets. To fight infection, we can use the anti-virus vaccines, tablets, masks, etc. But we can also fight more radically. By analogy with your offer, complete abandonment of ActiveX, completely abandon the air. But who needs this security, if by taking away from viruses their carrier - the air, we can destroy target of infection - people? )
Sergey Golubev
Moderator
93817
Sergey Golubev 2014.06.06 09:28  

Forum on trading, automated trading systems and testing trading strategies

Press review

newdigital, 2014.06.06 09:25

3 Steps to Trade Major News Events (based on dailyfx article)

Talking Points:

  • News releases can be stressful on traders
  • Develop a plan before the event arrives
Major news releases can be stressful on traders. That stress can show up for a variety of trading styles.
Perhaps you are already in a good position with a good entry and you are afraid the news release may take a bite out of your good entry.

Perhaps you want to enter into a new position as prices are near a technically sound entry point, but you are uncertain if the technical picture will hold up through the volatile release. Therefore, you agonize over the decision of whether to enter now or after the news event.

Maybe, you like to be in the action and initiating new positions during the release. The fast paced volatility during the news release still gets makes your palms sweat as you place trades.

As you can see, news events stress traders in a variety of ways.

Today, we are going to cover three steps to trade news events.


Step 1 - Have a Strategy

It sounds simple, yet the emotion of the release can easily draw us off course. We see prices moving quickly in a straight line and are afraid to miss out or afraid to lose the gains we have been sitting on. Therefore, we make an emotional decision and act.

Having a strategy doesn’t have to be complicated. Remember, staying out of the market during news and doing nothing is a strategy.

A strategy for the trader with a floating profit entering the news event could be as simple as “I am going to close off half my position and move my stop loss to better than break even.”

For the trader wanting to initiate a new position that is technically based, they may decide to wait until at least 15 minutes after the release, then decide if the set-up is still valid.

The active news trader may realize they need a plan of buy and sell rules because they trade based on what ‘feels good.’

Step 2 - Use Conservative Leverage

If you are in the market when the news is released, make sure you are implementing conservative amounts of leverage. We don’t know where the prices may go and during releases, prices tend to move fast. Therefore, de-emphasize the influence of each trade on your account equity by using low amounts of leverage.

Our Traits of Successful Traders research found that traders who implement less than ten times effective leverage tend to be more profitable on average.


3 - Don’t Deviate from the Strategy

If you have taken the time to think about a strategy from step number one and if you have realized the importance of being conservatively levered, then you are 90% of the way there! However, this last 10% can arguably be the most difficult. Whatever your plan is, stick to it!

If I put together a plan to lose 20 pounds of body weight that includes eating healthier and exercising, but I continue to eat high fat and sugar foods with limited exercise, then I am only setting myself up for frustration.

You don’t have to be stressed or frustrated through fundamental news releases.


To add comments, please log in or register