Codes

Change SL/TP on chart drop off for MetaTrader 5

This script will change the SL and TP of all open trades of the symbol to the price where the script is dropped off

Export trade history to CSV v2 for MetaTrader 5

This is the version 2 of my script to export the trade history from MT5 selected between two dates. The resulting file is CSV that can be opened/imported with any spreadsheet software. More columns were added and fixed minor errors. The code for processing and exporting data was rewritten

Export trade history to CSV for MetaTrader 5

This script will export the trade history from MT5 selected between two dates. The resulting file is CSV that can be opened/imported with any spreadsheet software. Current version 1.0 does not add the takeprofit and stoploss. Any advice to improve this is welcomed

Forum

In Linux, force Metaeditor using MQL4

I got Metaeditor build 2375 in my MT4 install under Linux. When creating a MQH file Metaeditor uses MQL5 but I want to use MQL4. How can I force Metaeditor to using MQL4 in an MQH file

Unable to update an already published EA in The Market

Hello. I want to update my EA which is already published in the Market. The validation check passed correctly. However I'm unable to complete the update becase there is an error "Invalid price" What does it mean? Is it related to the tag price in the Market

Incomplete color settings in MT5 Metaeditor 2650

Hello I am unable to find how to change the colors affecting the popup in metaeditor 2650 Which of the following settings allow me to customise the popup colors

OrderModify gives error 1 even checking the TP values before

I have created this function to update the TP/SL of market orders. In tester it sometimes shows error 1 whereas the TP and new price are the same values. if TakeProfit() and _precio are the same, I expect the function to skip OrderModify(). Most probably it is a stupid error from my side, but after

Version error uploading an updated EX4 into Market

I am getting the following error when trying to upload version 3.91 of my EA. Is this a bug or am I not setting the version correctly in my EA? Thanks

How can I get the margin requirement of the symbol?

This function does return zero only SymbolInfoDouble ( _Symbol , SYMBOL_MARGIN_INITIAL ) Using the class CSymbolInfo does not work either #include <Trade\SymbolInfo.mqh> CSymbolInfo simbolo; void OnStart () { simbolo.Name( _Symbol ); simbolo.Refresh(); Print ( "Initial margin: "

Bug? MT5 error calculating total commission paid

I just observed that MT5 is not calculating correctly the total commission paid

MT5 not reporting the correct account leverage

I tried to get the leverage of my account using this code Print ( AccountInfoInteger ( ACCOUNT_LEVERAGE )); Also saved a report of the history In all cases the leverage shown is 1:200 My broker confirmed that my account is set to 1:30 following European regulations. Also informed they cannot change

Help improving performance of Hull MA function

Wanting to include the Hull MA in an EA, I tried using the iCustom() call using the attached HMA indicator. This way it slows down the backtesting process very noticeably. Then I decided to adapt the indicator to create a function but the performance does not improve much. This function is called 4

CHanging Object properties from a different chart

Hello. I am trying to change the text property of an object in a another chart but I don't know why it does not work. The following script is unable to set a new string: if ( ObjectSetString ( 131552086461923216 , "testLabel" , OBJPROP_TEXT , "message" ) ) Print ( "message updated with