Forum

Custom Indicator for MA slope is calculating wrong

Hi guys, I don´t know what else to do now, so I ask for a bit of help. I´ve been struggling for several days now. I´m rewriting a MQL4 indicator that I created into MQL5. I just want the MA slope, and I normalize it with the ATR, so then I can aggregate this indicator values with the same indicator

[Python] I can´t modify order from script but I can from Jupyter

Pure Python 3.9 using the Metatrader5 library. I can create market orders and pending orders from Script, but I can´t modify the price of a pending order. What is weird is that I actually can do that from a Jupyter notebook. From my script all I get is None as result. No error code and that is what

Best way to keep a list of orders ordered by profit?

Hi there, in one of my EAs I'm trying to keep a grid with hedged positions and I want to keep two lists with longs and shorts ordered by current profit. Iterating through MT4 pool of orders/trades gives me the orders ordered by creation order, and as far as I know there is no way to get them ordered

Week High-Low from lower timeframe

Hi there, I've been fighting this thing since yesterday, tried different things, googled like a mad... I can't make it work. Let me explain: I want an indicator that marks with a vertical line the end of different times (end of day, end of week, end of month, end of quarter). The length of the

OrdersHistoryTotal() not working properly in the Strategy Tester

Hi, I'm writing an EA and for filtering purposes I need to know if the last closed trade was a winner or a loser. I'm using OrdersHistoryTotal() and debugging with Print(). My EA is having for instance 40% winners, 60% losers, but when I have a look at the Journal because I just see that all the

Moving Average and Shift parameter

Hi, there is something I don't understand about this parameter. Believe me that I've been searching for a while. The documentation says: shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago). So if I use Shift=0 then is the