Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 AnnBarnes, Today, 12:17 PM
      0 responses
      2 views
      0 likes
      Last Post AnnBarnes  
      Started by Lopat, 03-05-2023, 01:19 PM
      4 responses
      167 views
      0 likes
      Last Post Sam2515
      by Sam2515
       
      Started by f.saeidi, Today, 12:14 PM
      0 responses
      2 views
      0 likes
      Last Post f.saeidi  
      Started by giulyko00, Today, 12:03 PM
      0 responses
      4 views
      0 likes
      Last Post giulyko00  
      Started by AttiM, 02-14-2024, 05:20 PM
      12 responses
      213 views
      0 likes
      Last Post DrakeiJosh  
      Working...
      X