Codes

SAR ADX Signal for MetaTrader 5

SAR ADX Signal with mobile notification, rewritten from MT4 version (source no longer found). This is a repaintable indicator, please be careful when using it

No Repaint Heiken Ashi for MetaTrader 5

The Heiken Ashi indicator with no repaint or repaint mode input option

Forum

Storage Error: Failed Creating Diff Data

I got this error while committing files to MQL5 storage . I tried: - Restart MT5 several times - Relogging my account But still getting this error. MQL5 recently has errors that are tough to explain

Backtesting Status Never Completed, Empty Backtest Report

I have a problem when performing a backtest. After finishing the test, I don't have the results of the Backtest report, the status always stops at around 98-99%. And I don't have any error message in the logging tab. When I profile history, my program doesn't have an infinite loop. I noticed that

Internal Compiler Error When Trying To Build A Large EA

Hi, I got "Internal Compiler Error" message when trying build a large EA containing millions of lines of code (for testing purpose, I get tired of having to read files every test). Total data is about 4-500mb. But when I reduced the data size to ~50mb it built successfully. Is there a maximum size

_AppliedTo Return 0 When Calling iCustom

Hi, I'm testing some features, and am stuck trying to use data from another indicator using iCustom() The goal is that I want to pass applied price or an indicator handle to iCustom, but in that Indicator it always returns value = 0. My TestMA indicator works without any problem Specifically here, I

Wingding Arrow Error, Displaying Square Instead

I realized there are some characters in the wingding code that cannot be displayed properly, it always displays as a square. I use the example in the documentation with several inputs but it's still the same. void OnStart () { //--- string up_arrow= "up_arrow" ; datetime time= TimeCurrent ();

Optimization Error: Expert file ...ex5 Open Error [2]

Good day, I got this error when running optimization , but this error does not occur when I run single test . This error did not affect the test results, but after a few thousand passes my log file was stuffed to tens of GB of data, which is very irritating. I wrote the MACD indicator using Custom

How To Get Lot Size Base On Money Amount, Open Price And Stop Loss

Hi, I have an ideal that I can get lot size by amount of money at risk. But MQL5 doesn't have a default function to do that. So I create a function like: double GetLot( ENUM_ORDER_TYPE type, double SL, double openPrice, double moneyAmount) { if (moneyAmount == 0 || SL == 0 || openPrice == 0 )

Better Way To Get Recently Order Ticket?

Hello, I am currently using this method to get an order ticket when the order is placed successfully. Is this method the best practice? Is there any other more effective and secure way? Thank you in advance. if (trade.PositionOpen( _Symbol , orderType, lot, NULL , NULL , NULL , cmt)) { ulong

The way PR pointing is Ridiculous

Situation: I have 2 computers both running agents. It's funny that the computer with a CPU with nearly half the power of the other (Core i5-6500T vs Core i5-13400) has a higher PR score. Both are set to high performance mode. All of my computer's circumstances are good (a lot of RAM memory, disk

Efficient Way To Work With CopyBuffer() From Other Timeframes

Hello everyone, I'm learning how to get indicator data from another timeframe. Currently I'm still copying data one by one in a loop. // Call this function in a loop double CopyDataHandle( int &handle, datetime startTime, int bufferIndex= 0 ) { double data[ 1 ]; int copy; copy = CopyBuffer