Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2008.11.21 07:15

Lot_Volume - library for MetaTrader 4

| English 日本語 Русский 中文 Español Deutsch Português

votes: 5
Lot_Volume.mqh (0.85 KB)view

The functuion automatically calculates the lot size from the specified percent of free assets (х%) or uses the fixed lot size ("х" without "%" sign).

We add the function #include <Lot_Volume.mqh> to the program and call it in the necessary place: OrderSend(Symbol, Order Type, Lot_Volume(), Price, 0, Stop, Profit);

If you specify "10%", for example, then the size of the lot will be equal to 10% of free assets, and if you specify just "10" then the size will be equal to 10 lots.

Certainly, the library is not perfect, I wait for your comments.

Translated from Russian by MetaQuotes Software Corp.
Original code:

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

Average Directional Movement Index (ADX) Average Directional Movement Index (ADX)

The Average Directional Movement Index Indicator (ADX) helps to determine if there is a price trend.

Holt's double exponential smoothing (mt4 version) Holt's double exponential smoothing (mt4 version)

Holt's double exponential smoothing with linear forecasting.

TimeToNextCandle TimeToNextCandle

This indicator shows how much time remaining to the next bar opening.