|
A group of functions intended for trading management.
トレードの管理を対象とした関数のグループです。
OrderSend()、OrderClose、OrderCloseBy、OrderDelete、OrderModifyのトレード関数は、カスタム インディケータからは呼び出すことができません。
Trading functions can be used in experts and scripts. Trading functions
can be called only if the "Allow live trading" property of this
particular expert is checked.
トレード関数は、エキスパートとスクリプトで使用できます。トレード関数は、特定のエキスパートの "Allow live trading(本番トレード許可)"
プロパティがチェックされている場合に限り、呼び出すことができます。
To trade from experts and scripts, only one thread was provided that was
launched in the program trade context (context of automated trading from
experts and scripts). This is why, if this context is occupied with an
expert trading operation, another expert or script cannot call trading
functions at that moment due to error 146 (ERR_TRADE_CONTEXT_BUSY). To check whether it is possible to trade
or not, one has to use the IsTradeAllowed() function. To make a clear sharing of access to the trading context, one
can use a semaphore on the basis of a global variable the value of which
must be changed using the GlobalVariableSetOnCondition() function.
エキスパートとスクリプトからトレードするために、1つだけのスレッドが、プログラム トレード 状況(エキスパートとスクリプトからの自動売買の状況)の起動に割り当てられます。これは、もし、この状況が、エキスパートのトレード操作で占有されていれば、他のエキスパートかスクリプトは、エラー 146 (ERR_TRADE_CONTEXT_BUSY) のために、その時点で、トレード関数を呼び出すことができません。トレードが可能かどうかを確認するには、IsTradeAllowed() 関数を使用します。はっきりとトレード状況へのアクセスの共有をするためには、GlobalVariableSetOnCondition() 関数を使用して変更する必要がある、グローバル変数の値を基本したセマフォ(割り込み処理を制御し、同時アクセスによる不整合防止)を使用します。
|