Forum

Get maxima and minima (condition)

I am not able to get the correct values ​​of the maximum and minimum considering the condition: if(Candle[i].open<Candle[i].close && Candle[i].open>Candle[i+1].close). Can anyone help me with the script, thanks in advance. //+------------------------------------------------------------------+ //|

MQL5 - Search for the closest closed sales order

I have this function that checks the closest open sales order. My current need is to search for the closest sell order that the order has already been opened and closed ( same day). double novaVendaValor = 0 ; for ( int i = PositionsTotal ()- 1 ; i>= 0 ; i--) { if (

Sum of open position values ​​(mt5)

I am not able to get the sum of the open amounts. Can someone help me? Note: The sum of order quantity is ok. #include <Trade\Trade.mqh> CTrade trade; void OnTick () { //+------------------------------------------------------------------+ //| SELL POSITION - SUM AMOUNT OF OPEN ORDERS

MQL5 - Conditional code to delete obj_hline

I have a script that creates multiple hlines and I need to delete the lines as long as they meet the following criteria: 1- Name "Line Support xx" and parameter is the value of the line; Condition 1: Contains "Support Linexx" and Candle with opening price less than hline value and closing price

MQL5 - Create several horizontal lines

Please some kind soul can check the script for mql5 with following conditions: 1 - Creates a horizontal line on the opening price; 2 - Start drawing the lines from today onwards; 3- It has to be editable where I can delete or move the created lines. I made the code based on some models, but the