Mql5 Practise Questions
Mql5 Practise Questions
Chapter 3: Operations
21. Write a program to add two integers and print the result.
22. Multiply two double variables and store the result in a new variable.
23. Subtract one number from another using a predefined function.
24. Demonstrate how the modulus operator works with integer numbers.
25. Write a script to swap two variables using assignment operations.
26. Compare two variables and output whether they are equal or not.
27. Demonstrate the usage of all six relational operators.
28. Write a program to evaluate a complex boolean condition.
29. Use the AND operator (&&) to check multiple conditions simultaneously.
30. Write a program using the OR (||) operator to simplify decision-making.
31. Create a program that toggles a boolean variable using the NOT operator.
32. Write a program demonstrating the difference between = and ==.
Chapter 5: Functions
49. Write a function to add two integers and return the result.
50. Create a function with default values for some parameters.
51. Write a function that calculates the factorial of a number using recursion.
52. Implement a function that returns the maximum of three numbers.
53. Write a function with the void type that prints a message.
54. Pass an array to a function and calculate its average value.
55. Demonstrate passing parameters by reference to modify a variable.
56. Create overloaded functions to handle addition for int, double, and arrays.
57. Write a function to calculate the square of a number using typecasting.
58. Implement a function that takes datetime as input and formats it as a string.
59. Write a function that uses a struct to return multiple values.
60. Demonstrate the scope of local and global variables in functions.
61. Write a function to calculate and return the Fibonacci sequence up to n terms.
62. Create a program that uses both predefined and user-defined functions.
63. Write a script with a helper function that checks if a number is even or odd.
64. Implement a function that validates user input for a given range.
65. Write a program with a function to calculate compound interest.
66. Write a program using multiple data types and operations to simulate a trade calculation.
67. Implement a function that reads input variables and modifies an array dynamically.
68. Write a program that uses loops and arrays to calculate the moving average of a dataset.
69. Create a script using a switch statement to perform different mathematical operations.
70. Write a function that formats and prints trade information using struct.
71. Demonstrate the usage of global and static variables in a single program.
72. Implement a function to find the smallest and largest numbers in an array.
73. Write a program that uses a boolean operation to check trade conditions.
74. Create a program that combines multiple loops to analyze market data.
75. Write a script that tracks the number of function calls using a static variable.
76. Implement a function that takes an array of structures and processes them.
77. Write a program that simulates a stopwatch using datetime variables and loops.
78. Use a loop and if statements to validate user inputs and store them in an array.
79. Write a recursive function to calculate the sum of an array.
80. Create a function to parse a string and extract numerical values.
81. Write a program that uses overloaded functions to support different trade types.
82. Implement a program that combines enum and switch to display trading statuses.
83. Create a script to calculate the percentage change between two numbers.
84. Write a function that takes an array as input and returns the array reversed.
85. Demonstrate nested structures to manage hierarchical trade data.
86. Write a script that continuously checks for new trading opportunities using loops.
87. Create a program that calculates the time difference between two datetime variables.
88. Implement a function that calculates the total profit or loss based on an array of trades.
89. Write a program that reads user inputs and performs basic arithmetic operations.
90. Create a function to count the occurrences of a specific value in an array.
91. Write a script that implements and compares different sorting algorithms.
92. Use a loop to simulate a sequence of trades and calculate cumulative profit.
93. Implement a script that demonstrates multiple levels of function calls.
94. Write a program that checks for palindrome strings using loops and conditional operators.
95. Create a function that converts RGB values to a hexadecimal string.
96. Write a program to find all prime numbers in a given range.
97. Implement a script that processes user input and validates it using multiple conditions.
98. Write a function to calculate the standard deviation of a dataset.
99. Create a program that uses a loop to monitor and log the spread of a symbol.
100. Write a script that generates random numbers and stores them in a multi-
dimensional array.