Quantcast
Channel: MQL5: MetaTrader 5 trading, automated systems and strategy testing forum
Viewing all 75046 articles
Browse latest View live

Libraries: IncGUI_BitPic

$
0
0

It looks great!

Can we make the background transparent?

Thanks. 


Any Idea what trading system in this picture ?

$
0
0

I don't think the one i'm looking above is a special strategy rather than grid system.

The below EA worked exactly like that. Just remember to set buy Limit, buy Stop, sell Limit, and sell Stop input to true.

MetaQuotes Software Corp. Awarded Best Forex Software Developers

Signals tab in toolbox vanished then re-appeared !

$
0
0
song_song:
i'm not mean to compare brokers here. The list of brokers only include their name, server IP, timezone, decimal (4/5). This is useful for traders
Please write to service desk, as specific as possible, see what they say :)

Discussion of article "Interview with Igor Korepin (ATC 2011)"

$
0
0

New article Interview with Igor Korepin (ATC 2011) is published:

Appearance of the Expert Advisor cs2011 by Igor Korepin (Xupypr) at the very top of the Automated Trading Championship 2011 was really impressive - its balance was almost twice that of the EA featured on the second place. However, despite such a sound breakaway, the Expert Advisor could not stay long on the first line. Igor frankly said that he relied much on a lucky start of his trading robot in the competition. We'll see if luck helps this simple EA to take the lead in the ATC 2011 race again.

Author: Automated-Trading

How to set a position with multiple level of price for TP/SL?

$
0
0

Hi,

You could just shift your SL/TP levels according to the current market price but this would require that the EA is always on. I can not come with another solution.

every+100pips

$
0
0

Hi

would like to know how one would code "every+100pips" in mql5,.....may sound like very very dumb question......but will be of great help to me.

lion999

Help to Convert this GREAT SIGNAL from mql4 to mql 5


Installing Meta Trader 5 on Windows 7 64 bit

$
0
0

I've coded in Win32 before and understand a few of the API internals. The use of ole32.dll means that terminal64.exe is probably a COM application or uses COM objects, the thing is that i have little experience with COM programs but i'll try to help with a little analysis.

I did an imports dump for a working version of terminal64.exe (build 712) and these are all symbols imported from ole32.dll:

    CoFreeUnusedLibraries  ord:0 rva2iat: 011FD750
    OleUninitialize  ord:0 rva2iat: 011FD758
    ReleaseStgMedium  ord:0 rva2iat: 011FD760
    OleGetClipboard  ord:0 rva2iat: 011FD768
    CoTaskMemFree  ord:0 rva2iat: 011FD770
    RevokeDragDrop  ord:0 rva2iat: 011FD778
    CoLockObjectExternal  ord:0 rva2iat: 011FD780
    RegisterDragDrop  ord:0 rva2iat: 011FD788
    StringFromGUID2  ord:0 rva2iat: 011FD790
    CoCreateGuid  ord:0 rva2iat: 011FD798
    CoInitializeEx  ord:0 rva2iat: 011FD7A0
    CoCreateInstance  ord:0 rva2iat: 011FD7A8
    CoUninitialize  ord:0 rva2iat: 011FD7B0
    CreateILockBytesOnHGlobal  ord:0 rva2iat: 011FD7B8
    StgCreateDocfileOnILockBytes  ord:0 rva2iat: 011FD7C0
    StgOpenStorageOnILockBytes  ord:0 rva2iat: 011FD7C8
    CoRegisterMessageFilter  ord:0 rva2iat: 011FD7D0
    CoRevokeClassObject  ord:0 rva2iat: 011FD7D8
    CoGetClassObject  ord:0 rva2iat: 011FD7E0
    CreateStreamOnHGlobal  ord:0 rva2iat: 011FD7E8
    OleDestroyMenuDescriptor  ord:0 rva2iat: 011FD7F0
    OleCreateMenuDescriptor  ord:0 rva2iat: 011FD7F8
    IsAccelerator  ord:0 rva2iat: 011FD800
    OleTranslateAccelerator  ord:0 rva2iat: 011FD808
    OleDuplicateData  ord:0 rva2iat: 011FD810
    CoTaskMemAlloc  ord:0 rva2iat: 011FD818
    CoDisconnectObject  ord:0 rva2iat: 011FD820
    DoDragDrop  ord:0 rva2iat: 011FD828
    OleFlushClipboard  ord:0 rva2iat: 011FD830
    OleIsCurrentClipboard  ord:0 rva2iat: 011FD838
    CLSIDFromString  ord:0 rva2iat: 011FD840
    CLSIDFromProgID  ord:0 rva2iat: 011FD848
    OleInitialize  ord:0 rva2iat: 011FD850

Your ole32.dll should contain all of these exports or else it is corrupt or is an old version installed by another application but i really doubt it. There're many ways and applications you could use for getting a list of exported symbols from ole32.dll, but if you don't understand anything that you're doing then i recommend using Stud_PE (wich is what i used for getting the table above): http://www.cgsoftlabs.ro/studpe.html

What i don't understand is if terminal64.exe is not finding the entry point of the dll itself or for a specific symbol. It would be very helpful for debugging if the message box could display the symbol it is trying to load.

I believe that terminal64.exe is dinamically loading ole32.dll and this gives a chance that it's not finding it. Make sure that the file is in there (Windows\System32). Also the dll may be unregistered but it would be very unlikely because OLE is a part of the core foundation of Windows files. COM files (and thus OLE) need to be registered in order to use the objects inside them (read the below suggestions for registering).

My MT5 environment is working fine so i can't reproduce the error but i would try doing the following:

1) Re-register ole32.dll: Go to your Windows\System32 folder and locate ole32.dll, right click and copy, then within the same folder locate a file called "regsvr32.exe", right click to it and paste. You'll see a command prompt or you'll receive a simple message box, in that prompt or message box is the output for the registration of ole32.dll but lets not focus on that, if it works it works if it doesn't then we'll try another thing. After registering the dll try running the terminal.

2) Hijack ole32.dll: By default Win32/Win64 programs search for dlls in the executable's path first and if it doesn't find the dll then it looks in System32. So, we'll drop a working copy of ole32.dll in the MT5 folder and see if that works.

I'm providing my own file from Windows 7 Ultimate x64:

http://speedy.sh/WpPtm/ole32.dll
ole32.dll

MD5: 6C60B5ACA7442EFB794082CDACFC001C
Version: 6.1.7601.17514
English Locale.

Download it and move it to your MT5 folder along with terminal64.exe, then try running the terminal WITHOUT registering this new dll (i don't know if by registering this dll it will break registration of the original file, try if you want at your own risk but don't forget to register again the original file in case it doesn't work). Try copying your own original ole32.dll if mine doesn't work.

3) Virtualization: Setup a Windows based virtual machine from scratch and make a clean install of MT5. That will work for sure.

That's all i can do for you now, no guarantees.

Terminal64.exe - entry point could not be located in the dynamic link library ole32.dll - message after MT5 live update

$
0
0
tubal:
I am having the same problems with the dl from metaqoutes
And alpari, I find the ole32.dll in my system32 folder.

I tried both workarounds above but still get the same error.
Please see here : http://www.mql5.com/en/forum/8519

For a lossing EA, if we reverse all the trades (Old buy becomes New sell, vice versa), will the new system be profitable?

$
0
0
Good point, my vote is No, but if possible I would vote "Yes, if I'm lucky!", because in my opinion, when your strategy fails, is better plan again. Perhaps the backtesting shows that the reverse strategy is the best, and there is no guarantee about that, but even this case you have a new strategy to follow.

About the 20 votes dilemma, as far as I know it is not necessary since we can just see all votes and messages after we vote, but congratulations for looking for this level of research quality.

Bug in CExpertMoney::CheckOpenShort?

$
0
0
lori:

In the below code, if no price is specified the code will use the market ask price.

Surely this should be the bid if we're going short?

Yes it is a bug, it should Bid - not Ask. I hope one of the admins reply.

Good one lori 

Automated Trading Championship 2012: Fifth Week - Leader's Position More Stable Than Ever

$
0
0

The fifth week of the Automated Trading Championship 2012 is over and we can sum up the first results. The gap between the current leader JPAlonso and SAFF (Russia) occupying the tenth place has increased again comprising $60 000. We cannot say if it is possible to reduce that gap yet. However, we should remember that it is often not necessary to catch up with the Championship leader. Sometimes, it may be enough to wait for a leading trading robot to make a mistake and leave the top positions.

However, there is no reason to worry about JPAlonso (USA) yet - his trading robot has performed more than 20 trades within a month. According to the Rules of the Signals service, this robot's signals could have been put up for sale. Though subscription to trading signals of all Automated Trading Championship 2012 participants is free, future profits are not guaranteed.

Fifth Week - Leader's Position More Stable Than Ever.

The full text of the news can be found on the Championship's website - Fifth Week: Leader's Position More Stable Than Ever.

Problems with placing market orders - Invalid stops

$
0
0

Hello,

I have a problem with execution of market orders - they always return error "Invalid stops", though I provide all the necessary data according to http://www.mql5.com/en/docs/constants/structures/mqltraderequest. I use MetaQuates-Demo and I succeed in submitting order of type Instant Execution in the terminal. Here are the screenshots from and afterwards is the code that I use to send order from MQL5. The OrderSend method results with code 10016 and message "Invalid stops".

 

 

There is the source code:

void OnInit()
{
   MqlTradeRequest request;
   request.action = TRADE_ACTION_DEAL;
   request.symbol = _Symbol;
   request.volume = 0.1;
   request.type = ORDER_TYPE_BUY;
   request.type_filling = ORDER_FILLING_FOK; 
   MqlTradeResult result;
   OrderSend(request, result);
}

Could you please explain me what happens and what I can do to execute market orders from my EAs with the demo account? Thank you in advance!

Kind Regards,

Petrov

re error 4752

$
0
0

"the sell order request could not be completed"

 i have already read the other threads regarding this issue, and i am already using zeromemory before the order

 the ea was working fine last weekend, now i get this error ....

 also, if i run it through the strategy tester it works fine, no errors. just when i run debugging, i get this error popping up ....

 

does anyone know what the issue is ?  


Semi automatic - is this feasible?

$
0
0
RogH:
Do any wizards out there know if it is possible to manually reposition stops and targets of an EA once it is in trade?

My strategy trades support and resistance on the D1 using the zigzag as previous high/low. I’m currently defining the trade criteria and manually back-testing it, in preparation to post it in the 'jobs' as either MQL4 or 5.

I am proposing to set the target at the ATR but as I have been trading this strategy manually for a number of years it would be better for me to manually reposition both the target and stop according to the market information I am reading at the time.

My concern that interfering with the EA would cause it to malfunction.

I would be most grateful if someone could let me know if this functionality needs to be written into the EA or is moving the stop and target manually something that MT4 or MT5 can handle?

Many thanks

RogH, you can change stoploss and/or takeprofit anytime, i.e., they are not written in rock by human, EA or broker command, but as any system with multiple operations and/or multi-threads, you must take care to avoid conflicts, such as one manual order to increase stop loss while you have an automatic to decrease it. 

Quoting for a robot job

$
0
0

Choose one of the developer at the job section and send private message to him/her requesting for the quotation of the job you want to do.

Or open the job and some of the coders who applied for it will tell you the cost of your job.

MT4 and MT5 Server Times are different

$
0
0
gbemitte:
Are you using the same broker for mt4 and mt5? because the normally comes from broker. If you are using the same broker for both platform, your broker mt4 server time may be different from her mt5 server time.

Hi gbemitte,

 

The broker with MT4 is a Pepperstone demo account but the broker with MT5 is Metaquotes demo account - there is no broker.

This seems to me to be a daylight saving time issue.

As both are running on my PC and therefore both have the same base time zone setting it's not my system that would cause this. 

How do I fix  it? 

 

Ray. 

 

 

 

How can i drow 6 horizontal line?

$
0
0

Hi

How can i drow 6 horizontal line?What codes?

for Support & Resistance on price.

This code just drow 1 line in last price.

   for(int j=1 ; j<6 ; j++)

    {

     ObjectCreate(0,"S&R",OBJ_HLINE,0,0,array[d]);

     ObjectSetInteger(0,"S&R",OBJPROP_COLOR,clrOrangeRed);

     ObjectSetInteger(0,"S&R",OBJPROP_STYLE,STYLE_DASH);

     ObjectSetString(0,"S&R",OBJPROP_TOOLTIP,"S&R");

     d--;

    }


Discussion of article "Interview with Matúš German (ATC 2012)"

$
0
0

New article Interview with Matúš German (ATC 2012) is published:

It's the second time Matúš German participates in the Automated Trading Championship. By the end of the fourth week of ATC 2012 his Expert Advisor has been holding its positions in the TOP-10 having about $30 000. Matúš is from Slovakia, from the little town Bardejov. Matúš is interested in trading for about 5 years and he develops Expert Advisors for 3 years already.

The situation with your Expert Advisor this year is similar to the last year. It has made a huge profit in the first three weeks of the competition. In the last year's interview you told us that you had doubts about your success. What are your expectations this year?

I have exact the same doubts this year. Like I've already mentioned, the system must be very risky. Next week, I could very simply fall to last places. My luck depends on the market. But I am very happy that I occupy the TOP-10 for some time this year again and it is a small proof for me that I am good at what I do.

This time it's a multicurrency Expert Advisor. Why have you chosen it? Tell us more about your trading robot.

That's quite easy enough. I've done it because of diversification. I wanted to participate with a multicurrency Expert Advisor last year, but I did not know how to program a good multicurrency system. This year I developed an Expert Advisor based on a trend following system. It is not very good for live trading, but it is a good base for adding more features.

Matúš German - participant of the Automated Trading Championship 2012


Author: Automated-Trading

Viewing all 75046 articles
Browse latest View live