Forum

Does backtesting in MT5 guarantee positive results in live account?

Hey everyone, I've been testing a strategy coded in an expert advisor and I've had positive results. I have the EA trading only in the intersection of NY and LDN sessions and I have to manually turn it off if during any important news throughout the day. Idk if it's relevant but I'm using a 0 spread

Send Notification to Phone only after Price hits the sell stop

Hello everyone, I'm trying to send a notification to my phone every time the price reaches the Sell Stop order and a trade is opened. I stumbled across OnTrade() and OnTradeTransaction() but apparently they're executed right after a Sell Stop order is placed and not when then trade is opened. How do

Does PositionsTotal() work across different EAs?

Hey people, I'm new to mql5 coding and I've been wondering, does PositionsTotal() detect all positions opened by all running EAs or just the positions opened by the EA it's running from? Thank you in advance :)

Expert Advisor that trades on trending support and resistance

Hey people, I want to create an Expert Advisor that trades on trending support and resistance like what's shown in the pictures below but I have no idea where to start. Can anyone provide some help? Thanks :)

Is spread taken into account in expert advisors?

Hey! I have set up an EA that buys at ASK price. I want to know if it takes (in backtesting ) into account spread history and opens trades according to it or should I manually add to my TP to simulate real market

Does PositionTotal() function take into account all symbols?

Basically the title and if doesn't then how can I get the number of total positions opened in my account across all symbols? thank you

Get Ichimoku Values according to the Indicators window

I found out about how to implement the Ichimoku indicator in my EA, but it can only read the values that the Ichimoku takes according to the main chart. Instead, I want to find a way where I can compare the Ichimoku values to the Levels I set for it in the beginning, levels like 80, 20 that are

Store/Read variable between OnTick function and a custom function

As dumb as the question is, I've spent nearly 3 hours looking for an answer. My OnTick function reads and stores 2 consecutive tick values in 2 variable A and B, I then want to store B somewhere and then compare it with the new value of A and B when a new tick occurs, and again store B and so on

Broken Tick function

I'm still learning so I thought about printing the value of a tick as it occurs using this code: void OnTick () { double price = SymbolInfoDouble ( _Symbol , SYMBOL_ASK ); Print (price); } But Instead of Showing one tick value, it instead shows me all tick values from 2021-01-01 till now

Get the values of Last and Current tick

So I'm totally new to MetaEditor 5 and I've searched for this everywhere but couldn't really understand. All I want to do is to check the value of the last tick and store it in a variable and then store the current tick value on another variable, compare them, decide either to Buy/Sell and reset the