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

Reconstruction of positions - MetaTrader 5용 스크립트

조회수:
3865
평가:
(28)
게시됨:
2017.03.02 09:54
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

Reconstruction of positions — an example of working with a trading history on Hedge accounts.

An example of the final output:

position #0
DEAL_ENTRY_IN, type DEAL_TYPE_BUY, price 1.04552, Deal EURUSD, volume 0.03, DEAL_POSITION_ID #119707903, profit 0.00
DEAL_ENTRY_OUT_BY, type DEAL_TYPE_SELL, price 1.04562, Deal EURUSD, volume 0.02, DEAL_POSITION_ID #119707903, profit 0.20
DEAL_ENTRY_OUT_BY, type DEAL_TYPE_SELL, price 1.04534, Deal EURUSD, volume 0.01, DEAL_POSITION_ID #119707903, profit -0.18
position #1
DEAL_ENTRY_IN, type DEAL_TYPE_SELL, price 1.04562, Deal EURUSD, volume 0.02, DEAL_POSITION_ID #119708383, profit 0.00
DEAL_ENTRY_OUT_BY, type DEAL_TYPE_BUY, price 1.04552, Deal EURUSD, volume 0.02, DEAL_POSITION_ID #119708383, profit 0.00
position #2
DEAL_ENTRY_IN, type DEAL_TYPE_SELL, price 1.04534, Deal EURUSD, volume 0.05, DEAL_POSITION_ID #119708643, profit 0.00
DEAL_ENTRY_OUT_BY, type DEAL_TYPE_BUY, price 1.04552, Deal EURUSD, volume 0.01, DEAL_POSITION_ID #119708643, profit 0.00
DEAL_ENTRY_OUT, type DEAL_TYPE_BUY, price 1.04524, Deal EURUSD, volume 0.04, DEAL_POSITION_ID #119708643, profit 0.40

As can be seen, deals taken from the trading history are grouped into positions to which they relate. Grouping by parameter

DEAL_POSITION_ID

The ID of the position, which the deal opened, modified or closed. Each position has a unique ID that is assigned to all deals executed on the symbol during the position lifetime.

long



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

BIG DOG BIG DOG

The EA places pending stop orders BUY_STOP and SELL_STOP.

Autotrade Autotrade

The Expert Advisor places two pending orders (BuyStop and SellStop) with the specified expiration.

TrailingStop TrailingStop

An example of an Expert Advisor with a Trailing Stop implementation.

AIS1 AIS1

The EA works based on the analysis of Open, High and Low.