Forum

Deals and orders mixed retrieving history

Since I am not satisfied with the format MT5 exports the trade history to excel, I wanted to create my own with my custom format. Now, while the following function works as expected, getting the trades for the current day, it seems to be retrieving both orders and deals, but I would be interested

Delay when handling chart events

I have a test script that just draws a couple of HLines in the chart when pressing a keyboard key, any key (just for testing). Something like this: void OnChartEvent ( const int id, const long & lparam, const double & dparam, const string & sparam) { if (id== CHARTEVENT_KEYDOWN ){

Close order partially to get desired profit

Hi, I am trying to partially close some orders (2 or more) in a way that I can get some desired profit out of the trade...let me better explain with an example: Say that I have 2 (or more BUY orders) ongoing, say that all orders are in profit of, for example 567$, and my risk is 100$, with this, we

CLabel moves when rescaling or resizing window chart

I am using some CLabel insrtances in my EA and, while they work fine, I have not been able to make them stay in the desired time/price position when I re scale the chart o resize the chart window. I have been checking the CORNER and ANCHOR attributes but not sure if this is what I am looking for

NormalizeDouble problem

Do you guys have some other alternative for displaying a number in the chart window in a desired format other than NormalizeDouble function? I am asking because I have been using this function and, while this works quite ok in most of the cases, sometimes it seems to fail. Scenario : I am making

Stoploss/profit box in Mt4 with TradingView style

Hi, I was thinking about creating a SL/Profit box in MT4 similar to the one that they use in TradingView (imagen below). However, after an small attempt, I realized that, it is quite easy to use 2 rectangle objects for the SL and Profit parts, the chart candles are drawn on top of these 2

Price updates while dragging object

How do you guys do to get price updates from an object that is being dragged....let me explain.. I have an horizontal line placed at a let's say price XXXX, so when I click on that line to drag it up, I can get the CHARTEVENT_OBJECT_DRAG event, but it seems like it only gets received in the

Modify order already triggered

Hi, I wanted to modify an order using the command in MQL4 OrderModify, but, I think I might have not understood it correctly. My idea is to modify an order that is already ongoing, meaning that it has been already triggered. So that, for example, I can increase the TP by some points if the market

Coding sell/buy indicator

Hi, I would like to code (at least try to) an indicator that could give me a hint regarding the volume of sells/buys during a current bar. I know how to code in mql4 but I would appreciate ideas that could help to get somehow the desired result, if that is even possible. What is needed? where to

Contracts indicator

Hi community, I am new here, starting to play around with MT4 and it looks great. I usually trade the forex market and sometimes the FTSE100 index. My question is about the index. I was wondering, since the FTSE100 is supposed to be a regulated index by Eurex, would it be possible to get some sort