Print()

定義

NinjaTraderのOutputウインドウにデータを出力する。

注記: Print()メソッドを高い頻度で呼び出すとPCに負荷をかける。詳しくはPerformance TipsのNinjaScriptの項を参照すること。

構文

Print( string message)
Print( bool value)
Print( double value)
Print( int value)
Print( DateTime value)

引数

message 出力するメッセージ

// Generates a message
Print("This is a message");
 
// Prints the current bar SMA value to the output window
Print(SMA(Close, 20)[0]);

Tips

  1. デバッグを容易にするために、Low[0].ToString("0.00")の様にして整形することで価格を整列することができる。
        12.5
        12.75
    例えば上記のデータを整形すると次が得られる。
        12.50
        12.75
最終更新:2014年06月09日 19:38