거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Twitter에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
라이브러리

Price_Compare - MetaTrader 4용 라이브러리

조회수:
9106
평가:
(25)
게시됨:
2016.10.27 13:41
\MQL4\Scripts\ \MQL4\Include\
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

This small cross-platform library allows to compare the 'double' values of the "price" conveniently and quickly.

For example, before placing a SellLimit, it is sometimes useful to check if the opening price is below the current Bid price.

// if (NormalizeDouble(OpenPrice, Digits()) >= NormalizeDouble(Bid, Digits())) // this method was the most frequently used
if (CP(OpenPrice) >= Bid) // now it can be done like this
  OrderSend...;

Not only is this much clearer and more concise than the standard type check, but also the execution speed is several times higher! Such efficient usage of computational resources sometimes grants a noticeable boost in the tester/optimizer.

It is also possible to set the precision for comparing the 'double' values. For example

if ((CP(Lots, 0.01) >= MinLot) && ((CP(Lots, 0.01) <= MaxLot))) // compare with the precision up to the second decimal place
  OrderSend...;

All the comparison operators (==, !=, >=, <=, >, <) are handled in a similar fashion.

The library contains a faster method of the NormalizeDouble implementation. To improve the execution speed of the standard function, it is sufficient to add the following at the beginning

// Almost four times faster than the corresponding standard function (build 1395)
#define NormalizeDouble PRICE_COMPARE::MyNormalizeDouble

As an example, the attached script shows the results of comparison and normalization method for different price values.

MetaQuotes Ltd에서 러시아어로 번역함.
원본 코드: https://www.mql5.com/ru/code/16177

Indicator for monitoring the lot and profit Indicator for monitoring the lot and profit

The indicator displays the total lot and profit for the current instrument.

VATicks VATicks

Class for working with ticks in the MetaTrader 4. It is suitable for creating experts that make decisions on trading based on the analysis of tick data.

Sigma Bands Sigma Bands

Advanced Bollinger Bands indicator.

Multi Timeframe Moving Average Multi Timeframe Moving Average

The indicator displays the moving average for the selected timeframe.