Git Product home page Git Product logo

mql4-price's Introduction

MQL4-Price

Convert unit of price.

Description

A module that mutually converts price, value of pips unit, value of point unit.

pips

The calculation of 1 pips is as follows.
When currency pair with two or three digits after the decimal point (dollar circle, etc.) 0.01
When currency pair with 4 or 5 digits after the decimal point (euro doll etc.) 0.0001

point

The calculation of 1 point is as follows. If the number of digits after the decimal point is 3 digits, 1 point is 0.001 If the number of digits after the decimal point is 5 digits, 1 point is 0.00001

Requirement

Install

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

Usage

Include Price.mqh and use the method.

PipsToPoint

Convert pips unit value to point unit value.

PipsToPrice

Convert pips unit value to price unit value.

PointToPips

Convert point unit value to pips unit value.

PointToPrice

Covert point unit value to price unit value.

PriceToPips

Convert price unit value to pips unit value.

PriceToPoint

Convert price unit value to point unit value.

setScale, getScale

In the default setting, when converting with currency / symbol other than 2 to 5 digits after the decimal point, conversion may not be performed correctly. In that case, you can use the setScale method to adjust the internal variable mult used for calculation. If you want to know the current value of scale, you can get the value with getScale.

mql4-price's People

Contributors

keisukeiwabuchi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.