Download MetaTrader 5

The Dilemma Of Adding a Demo EA for a Niche CFD Market

To add comments, please log in or register
Write articles and earn money. We pay 200 USD for them!
Eric Elshout
445
Eric Elshout 2015.01.27 09:20 
I created an Expert Advisor and would like to add this product to the market for free demo availability.

In reading the description of "How to Post a Product in the Market" I run into some difficulties.

First: My EA is tailored to specific brokers due to differences in pricing, spreads, commissions and trading hours. This means I have a demo version for a limited amount of brokers, and the EA checks to see if it is run under the correct broker.

Is this possible under MQL standards?

Second:
the EA is designed to trade the German DAX CFD at those brokers and ONLY the German 30 DAX CFD. It may not - never - be run on any other index or instrument.

In the How to it is written: "Embedding any limitations by time, account type or number, financial instrument, etc. into your Program is prohibited. All restrictions will be considered as unfriendly to the Buyer and are prohibited."

But if I do not restrict the instrument to the DAX only the product will fail! What to do?

Third: If there are no limitations on Time and Account type permitted, does this mean that my Demo version can be run on a live account? This would be highly undesirable as that would mean the Demo turns into an unlimited Live version.

How do other vendors solve this? Do they not have demo versions of their products? That would be a real pity because the true power of showing what an EA can do is let the user play with it in a safe environment (demo account).

Thank you for any advice
Eric Elshout
445
Eric Elshout 2015.01.27 10:44  

OK I am starting to understand.

So the customers get a Live Version which they can try out on a Live system for a limited period of time when they select the Free Demo tab in the shop.

What are the exact limitations apart from the Reactivation parameter? i.e. How much time does an end-user get to test a product?

There is nothing in the documentation for that as far as I can find.


thanks

Snelle Moda
602
Snelle Moda 2015.01.31 11:12  

Hi

Nice to see other people are trading the DAX index future.


I had a similar issue with this, because my ea must use a different trade size when running on a live account.

Use this function to check if the ea is running on a demo or real account, you can also check the broker name.

You can block the ea when it's running under a live account or is using a different trading symbol.

https://www.mql5.com/en/docs/constants/environment_state/accountinformation#enum_account_info_integer


If you want to make sure that the ea is only working on the DAX future, use a string to check the name of the symbol.

See example.


I hope this information can solve your problem.

// Symbol name.
   string sSymbol;

// Account type, (DEMO/LIVE)
   int nAccount_Type;

//---------------------------------------------------------------------- 
// Symbol name, but only the firt four characters.
   sSymbol = StringSubstr(Symbol(), 0, 4); 
               
// Check symbol name on the trade server.
   if(sSymbol == "#FDX" || sSymbol == "DE30")
         {

// Check if the ea is running on a LIVE or DEMO account.                             
         if(AccountInfoInteger(ACCOUNT_TRADE_MODE) == ACCOUNT_TRADE_MODE_DEMO) // Check for DEMO account. 
               {                                                                                              
               nAccount_Type            = 1;     // Ref number of account type                     
               Alert("DEMO account! ", nAccount_Type);
               }
               else if(AccountInfoInteger(ACCOUNT_TRADE_MODE) == ACCOUNT_TRADE_MODE_REAL) // Check voor een LIVE account. 
               {                                           
               nAccount_Type            = 2;    // Referentie nummer van het account type.                                          
               Alert("LIVE account! ", nAccount_Type);
               }
         }
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Account Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Account Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Account Properties - Reference on algorithmic/automated trading language for MetaTrader 5
Dr.Trader
3781
Dr.Trader 2015.01.31 11:38  

Limitation to certain broker and trading symbol is prohibited i guess, only thing you can do - describe this limitation in ea description with big red font :)

I have seen some free demo versions of EAs, where authors limit lot size, or decrease trade frequency, or use default settings irregardles what users have selected in parameters. EA in this case still can be used on demo or live account, but obviously will make everything too complicated for user  to keep it running forever.

Basically, even if you limit ea to demo accounts - users will use some kind of trade copier that will copy every trade to real account, or will create signals out of it. So there is no point of limiting ea to demo accounts, anybody can copy these trades into real account.

Also, you got the market "DEMO" version wrong. These market demo versions can be only tested in strategy tester. Attaching demo EA to charts is impossible.

To add comments, please log in or register