Greetings, I am struggling to figure out what's happening in this case. Scenario: MQL5 EA Pending buy order with expiry (2 bars) is placed successfully (like many others before it during a back-test which work just fine, ie, expiries work, see
Greets, Hope someone can shed some light on this question. I must either be missing something, or it just is what it is. I am using OnTradeTransaction() to deal with events. All good, but I'm trying to use the classes (such as CDealInfo , etc)
Greets, Would appreciate any comment on where I might be going wrong here. Creating an indicator works as expected. However, I would like to parameterize the two horizontal levels (eg, 80% and 20%) instead of using the usual #property
Greets, This has been working for a while now, but today I noticed it's not working as expected. Not sure what's changed (maybe nothing has changed and this has never worked). I basically want to trigger some code when a deal is in profit/loss. It
Greets, I'd like to check the margin level percentage before placing a trade, but AccountInfoDouble(ACCOUNT_MARGIN_LEVEL) always returns 0.0. I've read the article here /en/forum/228052 but it doesn't solve my
Greetings, When performing backtesting mt5, in the results tab you are given the lowest margin level % it reaches. My broker does a margin call at 50%, so I’m trying to get clarity: given a leverage of 1:100 or 1:500 or whatever, is that margin level
Greetings, Trying to understand the meaning behind the number in the backtest results for Margin Level %. At what level would it be considered a 'bad thing", ie, being margin called in possible future live trading? For example, some of my backtests
Hi all, I'm trying to detect the last profit/loss in the transaction history (which I think I've got right), but something unexpected is happening, hopefully someone will have an idea. Here's the snippet: void OnTradeTransaction ( const
Greets, I've been trying my hand at writing MQL5 EAs for a while now and everything works as expected. I've always used the strategy tester on intra-day timeframes, but recently decided to give the Daily TF a try. Problem is the strategy tester
Greets, I've been googling around for a solution to this to no avail. Hopefully someone else has experienced this and knows what the solution is. So CopyBuffer() expects an int handle as the first argument. This works fine for most indicators
Greets, Here's a quick implementation of a grid trading idea showcased here I'm not sure if I've made a mistake, or if the concept simply doesn't work, but it always results in a loss in backtesting. Maybe someone can have a look, play with it, and
Greetings, I'd like to detect when the SL or TP level is hit and take appropriate action. Is the following snippet correct? void OnTradeTransaction ( const MqlTradeTransaction & trans, const MqlTradeRequest & request, const
Greetings, I'm trying to duplicate PineScript's bgcolor() function call in MQL5 - so far I've come up with: color canvasColor = clrLightGreen ; // Choose the color you want for the canvas ObjectCreate ( 0 , "BackgroundCanvas" , OBJ_RECTANGLE_LABEL
Greetings, I'm a bit puzzled by the following. The documentation recommends calling PositionSelect() before calling PositionGetInteger(), which I'm doing as follows: int sellPositionCount = 0 ; if ( PositionSelect ( _Symbol )) { for (