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

code question

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

    code question

    Can these events (statements) be put into a code to trade from and if so what would the code be.

    1) TheCurrent bar price of equal to the previous bars high+ 1 tickis the "first" time that a bar broke the previous bar high of that bar.

    2)This event (number 1) occured after the "most recent occurence" of a bar that broke its previous bar, low of that bar.

    Number 2 event must occur first, than followed by number one. We enter a long position if number 1 occurs after number 2. We also close any open short postion the same time the long postion is opened.

    Thanx MUCH.........Steve

    #2
    imported post

    Hi Steve,

    Yes you can do that but unfortunately we do not provide support in the form writing user requested code. Its not economically feasible for us.

    Some pointers though...

    if (Close[0] >= (Close[1] + TickSize))
    // Condition 1 is true

    If you call

    EnterLong()

    any open short position will be closed first.

    We always suggest trying a simple condition first. Make sure its working as you expect. Then add another layer, check if it works and then build step by step...

    Ray
    RayNinjaTrader Customer Service

    Comment


      #3
      imported post

      THANX MUCH FIR THE INPUT

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by DJ888, 04-16-2024, 06:09 PM
      6 responses
      18 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by Jon17, Today, 04:33 PM
      0 responses
      1 view
      0 likes
      Last Post Jon17
      by Jon17
       
      Started by Javierw.ok, Today, 04:12 PM
      0 responses
      6 views
      0 likes
      Last Post Javierw.ok  
      Started by timmbbo, Today, 08:59 AM
      2 responses
      10 views
      0 likes
      Last Post bltdavid  
      Started by alifarahani, Today, 09:40 AM
      6 responses
      41 views
      0 likes
      Last Post alifarahani  
      Working...
      X