Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Orders and Dataseries questions

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

    Orders and Dataseries questions

    Hi

    I have a couple two part questions:

    When the startegy has a dynamic SetStopLoss( ,CalcMode.Price, ,"simulated = false) in the OnBarUpdate Method....

    1A) Is the SetStopLoss cancelled at the end of a bar (if not re-submitted by the strategy) like Entry and Exit Methods?
    &&
    1B) Is it live & working at the broker until the market action triggers it regardless of whether or not the strategy was (voluntarily or involuntarily) terminated? (Assuming "Cancel strategy orders on strategy termination" isn't checked under the Strategies tab.)

    I have created a Dataseries in my strategy that calculates and sets a data value on a per entry signal basis....

    2A) If data is set in real time is it automatically saved, or does the data need to be generated on historical data each time the strategy is terminated and restarted?
    &&
    2B) If a....double mydouble = (EMA(myDataseries,5))[0].... and a data value is only created and Set on a per entry signal basis (as opposed to every bar) will the EMA of myDataseries select the last 5 values I Set for the prior 5 entry signals, or will it use the last 5 bars values like an EMA of the Close? I am looking for the last 5 values I Set, not the last 5 bars.

    Thank you for your assistance
    paradise

    #2
    1A) No
    1B) Orders are submitted to the exchange when possible - See here for more info - http://www.ninjatrader-support.com/v...ead.php?t=5349

    2A) Regenerated on creation of any new strategy object
    2B) Let me check on this
    RayNinjaTrader Customer Service

    Comment


      #3
      2B) It will calculate on last 5 bars, if no values are set, the value held is a zero. Best approach is to self calculate this data
      RayNinjaTrader Customer Service

      Comment


        #4
        Re: Dataseries

        Hi Ray,

        Thanks for your response. In regards to 2B)... I was researching the Reset() Method and was wondering if this method sets a null value that Ninjascript would ignore, making it possible to get an average of the last 5 values myDataseries does set. I am trying to have the strategy create a data value and then have the strategy be able to access an average of the last 5 values. Can this be done by some other means than the use of a moving average? I do not need to plot this on a chart, just have the strategy create the data and be able to access an average of the same.

        paradise

        Comment


          #5
          Null == No plot on chart or a zero value used for calculations. My last post still stands.
          RayNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          669 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          378 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          111 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          575 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          580 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X