• 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

conceptual question.

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

    conceptual question.

    Hi,

    I have a couple of conceptual question.

    When I use "CalculateOnBarClose = true".

    Using, for exemple: " if(Close[0] > SMA(8)[0]) {EnterLong("Entra Comprado")}" , and the CurrentBar is 1234.

    This condition only is defined, and open a buy, after the bar (N. 1234) is closed. If the timeframe is 10 min, for example, the value of de Close[0] and SMA(8)[0] values will vary, but so be defined when the bar closed.

    In the case of the stop loss and target profit, when the value of market reaches the value of the of stop loss and target profit, the trade will be closed in the value of the stop loss or in of the target profit. Is that correct ?

    Also on the chart when the closing of the bar number 1234 and the condition "Close [0> SMA (8) [0]" are met, a new trade will be to open in bar number 1235. Can you also confirm this??

    If the value of market reaches the value of stop loss or target profit in the bar n. 1234 the trade will be closed . even if the bar is not closed.

    #2
    Umm, yes to all your questions.

    But the best way to learn this, is to test this out on your own and verify.

    Comment


      #3
      Hello ocorrea,

      Thank you for your post.

      So the strategy must trade only on the 1234 bar? Or any point after the bar closes?
      Patrick H.NinjaTrader Customer Service

      Comment


        #4
        The strategy can trade any point after the bar closes.

        Comment


          #5
          Hello ocorrea,

          Thank you for your patience.

          The condition would be the following:
          Code:
          if(CurrentBar >= 1234)
          {
          // check for entry condition
          }
          Patrick H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by samir, Today, 11:35 PM
          0 responses
          4 views
          0 likes
          Last Post samir
          by samir
           
          Started by iceman2018, Today, 09:56 PM
          2 responses
          10 views
          0 likes
          Last Post samir
          by samir
           
          Started by [email protected], Today, 10:13 PM
          0 responses
          4 views
          0 likes
          Last Post garzon.javier.e@gmail.com  
          Started by iceman2018, Today, 09:51 PM
          0 responses
          6 views
          0 likes
          Last Post iceman2018  
          Started by n8dogg59, Today, 06:55 AM
          2 responses
          18 views
          0 likes
          Last Post n8dogg59  
          Working...
          X