Forum

problem about switch case

hey guys, i have a simple code that i to want make a bool custom function that looks for 2 simple patterns and if there is a pattern, takes true value (and print hello) and if not False, but when i want to code it with switch cases it gives me error. i only want it to take a number and bring it to

need help for coding a time window !

hi people. im new to this and im looking for a way to make a specific time window to trade in EA. for example 08:00 to 21:00 with which functions or method can i code it

xeon proccessor

hey guys. im about to buy a strong cpu for backtest and optimize in home, do xeon series work better than other types(like core i) for mt5? i cant decide from comparing benchmarks, becouse in most cases it shows that xeon has poor performance (for ex i3 9100f vs xeon e5 2650 v2) thanks

best way to use time based stoploss ?

guys best way or easy way to use time based stoploss is what? i wrote this but its weak. find the time of position opening put it in mqldatetime structure extract the minute of position opening add some minutes to it and compare it with current time . it has some problems and blind spots that it

odd result from iHighest and iLowest !

hey people, i got a simple code that instead of 0 gives me 23919 ! i want a code to find out the highest and lowest of the current day, but in 15m candles and with exception of current candle. but in this section i have a problem, when hour of day equals 0 it tries to go and find the highest and

data for backtest and optimization

Hi people. i should use which kind of data for backtest and optimization? which broker or mt5 data? any article or suggestion for such a matters? thanks

float instead of double?

hey again guys. can we store our price information in float type instead of double? we need maximum 5 decimal for price. and its faster in huge calculations. is there any problems with using that for EAs with lots of variables

how to calculate % in mql5?

hey boys, how can i calculate of any number in percentage in mql5 ? i could not find the function for example 20% of 12345

question about switch case

hey guys. what kind of operations we can use after "case:" and how many? do we allowed to declare variables after it? do we can use "if" after it

a question about if

hey guys, i could not find my answer in doc. what if we have 2 things to do when the condition has met? for example: if (x>Y) Print (x) && x++; this gives me error. i mean if the condition is true do both of them, if its not do none of them. thanks