1 October 2021

To get a random result, you can take MathRand() and use the modulus operator, it gives the reminder of division.

Source code viewer
  1. if(MathRand()%2 == 1)
  2. {
  3. OpenSell();
  4. }
  5. else
  6. {
  7. OpenBuy();
  8. }
Programming Language: MQL5