Skip to content

seankcw/MQL4-Assert

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

MQL4-Assert

Simple assertion module for MQL4.

Install

  1. Download Assert.mqh
  2. Save the file to /MQL4/Include/mql4_modules/Assert/Assert.mqh

Usage

  1. Define IS_ASSERT
  2. Include Assert.mqh
#define IS_ASSERT
#include <mql4_modules/Assert/Assert.mqh>

double sample(double lots, double price) {
   assert(lots > 0, "invalid parameter lots");

   ...
   ...
}

In this case, if lots less than zero or equales zero, displays message.

Note: You need define IS_ASSERT before include assert.mqh.

Bibliography

About

Simple assertion module for MQL4

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • MQL5 100.0%