Forum

Load trades from file to MT4/5

Hi, does anyone have any script what loads trades I have in external file in MT4(5) (trades are from different platform, but I would like to visualize it in Metatrader? Input format does not matter, I can rearrange columns and format, but I don't know how to draw it in charts. Thank you

Difference between CPositionInfo.identifier() and CPositionInfo.Ticket();

Hi, im using standard Mq5 library CPositionInfo I would like to ask what is the difference between CPositionInfo .identifier() and CPositionInfo .Ticket(); I have found that some ppl are using Ticket(), but I didnt found it in code. But it is working. For me it looks those values are same. Thank

Storing number of opened trades in static variable like dictionary

Hello guys, im facing issue with BasicHashLoop in "hastable-templated.mqh" which I am using for having avalable something like dictionary is in different languages. Ofcourse I would like to not use third party codes , but Im not sure how to solve the situations that I need to hold number(count) of

dictionary mql or something similiar. Checking if pendings were opened.

Hello i need help with checking if pending orders were opened in my EA. Currently I am doing it like - I save in static value number of opened trades. Then Im checking opened trades and if this values is bigger than the value in static variable then it means pending order was opened. Thats fine and

Two orders being opened at same time

Hi, im solving small problem. I have code like if(OrdersTotal()==0): orderSend(Symbol()... OP_BUYSTOP....) Sometimes it happens that 2 positions are opened in same time. How is that even posible? Is it because new tick comes immediatelly after first one? I mean like OrderSend is just being send

Recognizing trend

Hello guys. I'm still thinking how to recognize trend with EAs. You know manually, when looking at the graph you can say "ok this is uptrend". Its going nicely upward... My problem is to how to automatically recognize trend. What do I now is doing array of 4 EMA values and then im trying to copare

Need help with mql. PERIOD_D1 and weird behaviour

Hello guys, I need advice. I have never met with anything like this. I have EA, where in code I have this ( Im using high of previous day in my calculation) [source] if(den==0) // for historical reason, all is same { y_high=iHigh(Symbol(),PERIOD_D1,1);//previous day