• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot bar close price

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Plot bar close price

    Hi Adviser,

    I would like to develop a strategy which plot a dot when 5 min bar close equal to certain price. For example when 5 min bar equal to price of 14, I would like the system plot a dot. Please correct me if I wrote wrong

    // Condition set 1
    if (Close[1] + 0.16 * TickSize == MyInput0)
    {
    DrawDot("My dot" + CurrentBar, false, 0, 0, Color.Blue)

    Any comment is appreciate.

    Thanks,

    Remon

    #2
    Your logic would seem ok, given MyInput0 is a value that would match the formula you've created. I'd suggest always making liberal use of Print() statements to ensure the values you get are values you expect.

    In terms of hte DrawDot, you're passing a value of 0, which likely does not display on your chart. You'll want to use a relative bar value to ensure that it's drawing at a price level you can see:

    DrawDot("My dot" + CurrentBar, false, 0, Low[0] - TickSize, Color.Blue)
    MatthewNinjaTrader Product Management

    Comment


      #3
      Thanks for your support,

      I am kind new to the system. Can you tell me how to making liberal use of Print() statements?

      Thanks,

      Comment


        #4
        You can use the Print() method which will output different values to the Output window. Information on this can be found below:

        http://www.ninjatrader.com/support/f...ead.php?t=3418

        For example you can use:

        Print(Close[1] + 0.16 * TickSize);
        Print(MyInput0);

        Which should give you the values at that time. You can break it up even further and have a seperate Print(Close[1]) to ensure the bar value is what you expect before you at the 0.16 * TickSize, etc.
        MatthewNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cociahange, Today, 03:53 AM
        0 responses
        1 view
        0 likes
        Last Post cociahange  
        Started by dukeoferl, Today, 03:26 AM
        0 responses
        1 view
        0 likes
        Last Post dukeoferl  
        Started by Titelluvifa, Today, 02:49 AM
        0 responses
        2 views
        0 likes
        Last Post Titelluvifa  
        Started by rehagen, Today, 01:44 AM
        0 responses
        2 views
        0 likes
        Last Post rehagen
        by rehagen
         
        Started by bouncetherubble, Yesterday, 07:33 PM
        0 responses
        7 views
        0 likes
        Last Post bouncetherubble  
        Working...
        X