オブジェクト生成【ObjectCreate】

bool ObjectCreate(string name, int type, int window, datetime time1, doubleprice1, datetime time2=0, double price2=0, datetime time3=0, doubleprice3=0)

 

Creation of an object with the specified name, type and initial coordinates in the specified window. Count of coordinates related to the object can be from 1 to 3 depending on the object type. If the function succeeds, the returned value will be TRUE. Otherwise, it will be FALSE. To get the detailed error information, one has to call the GetLastError() function. Objects of the OBJ_LABEL type ignore the coordinates. Use the function of ObjectSet() to set up the OBJPROP_XDISTANCE and OBJPROP_YDISTANCE properties.

指定したウィンドウに、指定した名前、型、初期座標をもつオブジェクトを作成します。オブジェクトに関連する座標の数は、オブジェクト型によって、1 から 3 個までありえます。もし、関数が正常終了した場合、返される値は TRUE です。それ以外の場合、FALSE になります。詳細なエラー情報を取得するにはGetLastError() 関数を呼び出します。OBJ_LABEL 型のオブジェクトの座標は無視されます。OBJPROP_XDISTANCE および OBJPROP_YDISTANCE プロパティを設定するには、関数の ObjectSet() を使用します。

Notes: The chart sub-windows (if there are sub-windows with indicators in the chart) are numbered starting from 1. The chart main window always exists and has the 0 index.

注意:チャートのサブ・ウィンドウ(チャートにインディケータのサブ・ウィンドウがある場合)は 1 から番号が開始されます。チャートのメイン・ウィンドウは、常に存在して 0 のインデックスをを持っています。

Coordinates must be passed in pairs: time and price. For example, the OBJ_VLINE object needs only time, but price (any value) must be passed, as well.

座標はペア(時間と価格)で渡す必要があります。たとえば、OBJ_VLINE オブジェクトは、時間だけを必要とします。しかし、価格(任意の値)も渡す必要があります。

Parameters:

パラメータ:

name
Object unique name.

オブジェクトの重複しない名前。

type
Object type. It can be any of the Object type enumeration values.

オブジェクトの型。Object 型の列挙値のいずれかを指定できます。

window
Index of the window where the object will be added. Window index must exceed or equal to 0 and be less than WindowsTotal().

オブジェクトの追加先となるウィンドウのインデックス。ウィンドウのインデックスは 0 以上にして WindowsTotal() よりも小さくする必要があります。

time1
Time part of the first point.

最初の点の時刻の部分。

price1
Price part of the first point.

最初の点の価格の部分。

time2
Time part of the second point.

2番目の点の時刻の部分。

price2
Price part of the second point.

2番目の点の価格の部分。

time3
Time part of the third point.

3番目の点の時刻の部分。

price3
Price part of the third point.

3番目の点の価格の部分。

 

Sample:

サンプル:

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">