Forum

Changing the comment to trades which hit a stop loss or take profit

Hi all, Thank you for looking at this thread. I want to know whether or not it is possible to change the comment on MQL5 to trades which hit a stop loss or take profit ? I have a comment added to trades which closed based on my exit condition, but if a stop loss or take profit is hit that comment

EA which prints out daily returns

Hi all, I'm looking for a good technique which can extract the daily returns of a trade history on the backtester of an EA. Would anyone be able to direct me to the best way to do this? Cheers and thank you for looking at this thread

Using MetaTrader 5 to backtest a portfolio of strategies

Hi all, I've got a simple question. I've got a bunch of strategies that I want to test simultaneously (using different markets also) on the MetaTrader 5 backtester . What is the best way to go about doing something like this? Thank you for looking at this thread

Array out of range

Hi all, I get the array out of range error and I cant seem to figure out why! Any help is greatly appreciated! MqlRates PriceInfo[]; //Sorts it from the current candle to the oldest candle ArraySetAsSeries (PriceInfo, true ); //Copies the price information into the array double Data= CopyRates

ArrayResize for 2D arrays

Hi all, A quick question here, how would I write the following using ArrayResize? Thank you :) double arr[ 10 ][ 12 ]

Reading a CSV file into an EA

Hi all! Thank you for looking at this thread. I'm having an issue at the moment of trying to import a matrix from a CSV file into a MetaEditor script. The file below is what the CSV file looks like in MetaEditor. What piece of code could I write to efficiently import these numbers into an array

EA removing itself from chart on tick

Hi all! Thank you for looking at this thread. I'm having an issue where an EA keeps removing itself from a chart on tick. It occurs when I add a function to my main EA script. The function is down below. Any help would be greatly appreciated, this is giving me a real headache

EA disappears off chart when this library function is applied

Hi all! Thank you for looking at this thread. I'm writing some basic indicators in MQL5, and I am currently writing one for a simple average true range with no smoothing. Compiling the code leads to no errors or warnings. For some reason when I apply the EA to a chart it loads on fine but then on

Closing trades using the Expert iD magic number

Hello! Thank you for having a look at this thread! I'm looking to use multiple EAs on the same symbol and the same timeframe but each EA has its own magic number. Could someone give me a short algorithm which will close an open position which was open by a EA which has its own unique magic number

Using SetExpertMagicNumber using the CTrade class

Hello! Thank you for taking your time took look at this thread. I'm having an issue with the CTrade class SetExpertMagicNumber function . If I write something like trade.SetExpertMagicNumber(12345), how would I be able to print that result out so I'm sure that trades made with that particular EA