- LogLevel
- SetExpertMagicNumber
- SetDeviationInPoints
- SetTypeFilling
- SetTypeFillingBySymbol
- SetAsyncMode
- SetMarginMode
- OrderOpen
- OrderModify
- OrderDelete
- PositionOpen
- PositionModify
- PositionClose
- PositionClosePartial
- PositionCloseBy
- Buy
- Sell
- BuyLimit
- BuyStop
- SellLimit
- SellStop
- Request
- RequestAction
- RequestActionDescription
- RequestMagic
- RequestOrder
- RequestSymbol
- RequestVolume
- RequestPrice
- RequestStopLimit
- RequestSL
- RequestTP
- RequestDeviation
- RequestType
- RequestTypeDescription
- RequestTypeFilling
- RequestTypeFillingDescription
- RequestTypeTime
- RequestTypeTimeDescription
- RequestExpiration
- RequestComment
- RequestPosition
- RequestPositionBy
- Result
- ResultRetcode
- ResultRetcodeDescription
- ResultDeal
- ResultOrder
- ResultVolume
- ResultPrice
- ResultBid
- ResultAsk
- ResultComment
- CheckResult
- CheckResultRetcode
- CheckResultRetcodeDescription
- CheckResultBalance
- CheckResultEquity
- CheckResultProfit
- CheckResultMargin
- CheckResultMarginFree
- CheckResultMarginLevel
- CheckResultComment
- PrintRequest
- PrintResult
- FormatRequest
- FormatRequestResult
Buy
指定されたパラメータで買い注文を出します。
bool Buy(
|
パラメータ
ボリューム
[in] ポジションボリューム
symbol=NULL
[in] ポジションシンボル(シンボルが指定されていない場合は、現在のシンボルが使用されます)。
price=0.0
[in] 価格(価格が指定されていない場合は、現在の買値が使用されます)。
sl=0.0
[in] 決済逆指値
tp=0.0
[in] 決済指値
comment=""
[in] コメント
戻り値
構造体のチェックが成功した場合は true、それ以外の場合は false
注意事項
Buy(...) メソッドの正常な完成は、取引操作実行の成功を意味するものではありません。取引リクエストの結果(取引サーバの リターンコード)を ResultRetcode() 及び ResultDeal() から戻された値を使用してチェックすることが必要です。