Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

entriesperdirection and errohandling error?

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

    entriesperdirection and errohandling error?

    Hi,

    I am setting EntriesPerDirection and ErrorHandling in the Initialize section of a strategy but they appear to have no effect. i.e. I do this
    EntryHandling = EntryHandling.UniqueEntries;
    EntriesPerDirection = 3;
    But when I print them in the OnBarUpdate section they revert to their default values. If I set them in the strategy parameters they work fine.

    What am I doing wrong?

    Thanks,
    Ian

    PS while I'm here is there any way to determine the price that a trailing stop is set to? I'd like to draw a dot on the chart that shows the value of the trailstop for a bar. Also (maybe I should have started a new thread for this...) if SetTrailStop is set to a price, does that mean the trailstop is set to the difference between the price the stop is set to and the current price? The bar Open? (and will trail at that value?)

    Thanks again...
    Last edited by Owlman; 10-16-2010, 05:29 PM.

    #2
    Resolved

    Shut down Ninja then restarted it. Seems to be working now...

    Comment


      #3
      Hello Owlman,

      Trail Stop will trail the last traded price by the specified percentage or tick value.
      For long positions, you could use:

      (Close[0] - (trailTicks * TickSize))
      Last edited by NinjaTrader_RyanM1; 10-17-2010, 04:09 PM.
      Ryan M.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      77 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      45 views
      0 likes
      Last Post PaulMohn  
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      168 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      101 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      165 views
      2 likes
      Last Post CaptainJack  
      Working...
      X