Hello all, I’m trying to write an ea where when price breaks an EMA, and comes back to touch it again, I’m placing an order to anticipate a bounce. I’ve tried this but lots of trades are missed: Buy if previous candle low > previous EMA and
Hello all, I am curious as to it is better to backtest over a longer period or shorter period. I know the obvious answer is longer period, but technical analysis likely develops over time, making the modern times more relevant. In the case of
Hello, I have been writing very basic stuff, and from this code I don't understand why not all the candles are accounted for. It should be the case that each candle is a new trade, but yet there are some gaps in dates aside from the weekend
Hello all, I've been making a program so I can see what percent of the time a moving average cross (with price) gets faded and what percent of the time it is a breakout. This is purely based on the close of the next candle. Right now it appears that
When I try to print the hours, minutes, and seconds, the minutes and seconds are fine but the hours just prints 1. MqlDateTime mtime; TimeToStruct ( TimeCurrent (),mtime); Print ( "mtime.hour = " ,mtime.hour); // outputs 1 Print (
Since MT5 is in GMT + 2 and London is GMT + 1, and London opens 8:00am local time , does that mean the time in MT5 will be 9:00am and GMT will be 7:00am?
I've looked into TimeCurrent() as well as CDatetime and I can't seem to figure out to determine the number of seconds elapsed in a day. I like TimeCurrent(), but I would prefer to have only the time without the date. I need to obtain the number of
I read the information here: https://www.metatrader5.com/en/terminal/help/mql5cloud/mql5cloud_use and I am not able to get cloud agents to show that they are "processing." It only shows them as "ready." I have my account connected, with money in
For some reason my code is only recognizing when a sell position is open and not a buy position. //+------------------------------------------------------------------+
Hey everyone, I came across what appears to be something in parentheses right before a function in the OnTick part of the reference. What does it mean and what is it called? Any help would be appreciated! Example: ( ENUM_ACCOUNT_MARGIN_MODE )