Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

using price Value in a strategy

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

    using price Value in a strategy

    Hi,

    how do i use the price value in a strategy instead of an indicator?

    So,if the price is @ 2020 and i wan the strategy to buy whe the Close is above 2030,or sell when the Close is below 2010?I know it can be done via lmt orders,but the strategy i use additionally track for other things.

    Thanks!
    Last edited by outsource; 03-26-2015, 05:19 PM.

    #2
    Hello outsource,

    You would continue to use Close price series and compare that to whatever you are using to track the price.

    Example -
    if(Close[0] > SMA(14)[0])
    EnterLong();

    http://www.ninjatrader.com/support/h...html?close.htm
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Cal View Post
      Hello outsource,

      You would continue to use Close price series and compare that to whatever you are using to track the price.

      Example -
      if(Close[0] > SMA(14)[0])
      EnterLong();

      http://www.ninjatrader.com/support/h...html?close.htm
      Hi Cal.

      no,i use nothing to compare with.I`d need the price values solely

      Comment


        #4
        So,is there a way to put the price as conditions for entry?

        Say,if price@2020 - go long
        if price@2010 - go short

        ?

        Comment


          #5
          Hello outsource,

          Thank you for your response.

          For the price call Close[0]. So for your two conditions:
          Code:
          if(Close[0] == 2020)
          EnterLong();
          if(Close[0] == 2010)
          EnterShort();
          For information on Close please visit the following link: http://www.ninjatrader.com/support/h.../nt7/close.htm

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by geotrades1, Today, 10:02 AM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by ender_wiggum, Today, 09:50 AM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by rajendrasubedi2023, Today, 09:50 AM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by bmartz, Today, 09:30 AM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by geddyisodin, Today, 05:20 AM
          3 responses
          27 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X