본문 바로가기
트레이딩/메타트레이더 코딩

MQL5. PositionSelect, PositionGetDouble, PositionGetInteger, PositionGetString

by i.got.it 2019. 4. 19.

PositionSelect

Chooses an open position for further working with it. Returns true if the function is successfully completed. Returns false in case of failure. To obtain information about the error, call GetLastError().

bool PositionSelect(
string symbol // Symbol name
);

반환값. 

- true : 함수호출결과 성공인 경우, fasle : 호출결과 실패인 경우 포지션0인 경우에도 false 반환됨.

 

설명.

- 인자로 전달된 심볼 1개에 포지션 여러 개인 경우엔 ticket 번호가장 작은 것 1개만 선택됨. 

- PositionSelect 이후 연속하여 아래 함수를 호출하는 식으로 사용된다. 

PositionGetDouble, PositionGetInteger, PositionGetString

 

 

 

 

 

 

 

상세

PositionSelect

https://www.mql5.com/en/docs/trading/positionselect

 

Documentation on MQL5: Trade Functions / PositionSelect

PositionSelect Chooses an open position for further working with it. Returns true if the function is successfully completed. Returns false in case of failure. To obtain information about the error, call GetLastError(). bool  PositionSelect(    string  symb

www.mql5.com

PositionGetDouble 

https://www.mql5.com/en/docs/trading/positiongetdouble

 

Documentation on MQL5: Trade Functions / PositionGetDouble

PositionGetDouble The function returns the requested property of an open position, pre-selected using PositionGetSymbol or PositionSelect. The position property must be of the double type. There are 2 variants of the function. 1. Immediately returns the pr

www.mql5.com

PositionGetInteger

https://www.mql5.com/en/docs/trading/positiongetinteger

 

Documentation on MQL5: Trade Functions / PositionGetInteger

//+------------------------------------------------------------------+ //| Trade function                                                   | //+------------------------------------------------------------------+ void OnTrade()   { //--- check if a positio

www.mql5.com

PositionGetString

https://www.mql5.com/en/docs/trading/positiongetstring

 

Documentation on MQL5: Trade Functions / PositionGetString

PositionGetString The function returns the requested property of an open position, pre-selected using PositionGetSymbol or PositionSelect. The position property should be of the string type. There are 2 variants of the function. 1. Immediately returns the

www.mql5.com

 

 

 

 


첫등록 : 2019년 4월 19일 

최종수정 : 

 

본 글 단축주소 : https://igotit.tistory.com/2120

 


 

'트레이딩 > 메타트레이더 코딩' 카테고리의 다른 글

MQL5. CPositionInfo  (0) 2019.04.23
MQL5. PositionGetSymbol  (0) 2019.04.19
MQL5. PositionsTotal  (0) 2019.04.19
MQL5. NormalizeDouble  (0) 2019.04.19
메타트레이더 5. MetaEditor. MQL5 Script. CyClosePositionAll  (0) 2019.04.19

댓글



 

비트코인




암호화폐       외환/나스닥/골드       암호화폐/외환/나스닥/골드 암호화폐/외환/나스닥/골드   암호화폐/외환/나스닥/골드
     
현물 |선물 인버스 |선물 USDT       전략매니저(카피트레이딩)     롤오버 이자 없는 스왑프리계좌
( 스왑프리 암호화폐도 거래 가능 )    
MT4, MT5 , cTrader 모두 지원     FTMO 계좌 매매운용. MT4,MT5