bool OrderClose(int ticket, double lots, double price, int slippage, int color color=CLR_NONE)
Closes opened order. If the function succeeds, the return value is true.
If the function fails, the return value is false. To get the detailed error
information, call GetLastError().
保有しているオーダーを閉じます。この関数が正常終了した場合、戻り値は TRUE です。この関数が失敗した場合、戻り値は FALSE です。詳細なエラー情報を取得するには、GetLastError() を呼び出します。
Parameters:
パラメータ:
| ticket |
- |
Unique number of the order ticket. オーダーチケットの一意の番号。 |
| lots |
- |
Number of lots. ロット数。 |
| price |
- |
Preferred closing price. 決済したい終値。 |
| slippage |
- |
Value of the maximum price slippage in points. ポイントでの最大スリッページ価格の値。 |
| Color |
- |
Color of the closing arrow on the chart. If the parameter is
missing or has CLR_NONE value closing arrow will not be drawn on the
chart. チャート上の決済した矢印の色。 もし、パラメータが欠けているか、CLR_NONE
値をもっている場合は、決済した矢印はチャート上に表示されません。 |
|
Sample:
サンプル:
if(iRSI(NULL,0,14,PRICE_CLOSE,0)>75)
{
OrderClose(order_id,1,Ask,3,Red);
return(0);
}
|