Forum

Suggestion for Spacing between Graphical Objects of type OBJ_TEXT

Hi everyone I have written a code to create 2 graphical objects of type OBJ_TEXT as per the picture bellow The first object is an arrow (using Wingdings Font Type) placed at the last low and right bellow it is a text. My question is the following . What is an efficient way to determine the spacing

Multi-Symbol optimisation MT5, Possible?

Hello I am getting into a discussion if the above is possible. I am not talking about the option "All Symbols in Market Watch " but instead running iteration of the various inputs on different symbols (on a single-symbol EA) with the Symbol being one of the things changing in each pass. The purpose

Web requests, allowed URL and forgetting www

Assume I want to get data from page https://www.abc.com using web requests However in the Allowed URL user input https://abc.com because when copy pasting from browser the www gets neglected. The web-request fails in this case as the web request returns -1. My understanding is Allowed URLs list

How to optimize a Grid/Martingale ?

Hi all The Grid strategy has a number of stages 1) The entry strategy when no trades are active 2) Closing the initial trade in profit (Using TP / Trailing Stop) 3) Opening additional trade when the previous trade is in loss 4) Closing the basket of trades when their average profit is in profit

Escape Function Order when Order Takes Too Long

bool tradeAttempt= false ; Print ( "attemp " +pSybmol); tradeAttempt= trade.Buy(LotUsed,Sybmol,bid, 0 , 0 ,comment); Print (tradeAttempt+ " " +trade.ResultRetcode()+ " " +trade.ResultRetcodeDescription()); Hi everyone This a simple part of code that place a Buy Market Order that opens the

Collect Symbols Last Tick Prices in Multicurrency EA

Hi I wish to find the most efficient way to perform this in MT5. The way I am looking is to check every x seconds(eg 5) and record the prices of every symbol I selected from a single chart EA. The problems with that are obvious. - I will miss any ticks that occurred during those x seconds in each

MT5 News Filter using Calendar Functions

Hi everyone I would like some feedback on my code or how I can make it more efficient as it uses several conditionals and loops. I wanted to create a multicurrency news filter for when 30 minutes before and after the current time there is an important news event. For each news event I need its Time

Improving Speed of Code Execution

Hi everyone I am writing an MT5 multi-currency EA that uses several indicators. Rather than create Handles and Arrays for each Indicator/Currency I created functions to easily get the values for each indicator that I use in the OnTick on every new candle. It takes however rather long to calculate

Conditionally selecting which function to run out of 1000s of possibles.

Hello everyone. I am trying to write an EA that has a loop and for each iteration I want it to run a different function . Each function contains some criteria to be checked and its operations are irrelevant to each other so calling function(i) will not do anything. Naturally I could use a switch

Re-Initialise all charts prommaticaly

Hi guys I am trying to find a way to programmatically re-initialise all of the active charts. What I tried is to write a loop that goes through all the active charts and change the TF to M1 and back to its previous TF. void InitialiseActiveCharts() { long currChart,prevChart= ChartFirst (); int