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

Break out

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

    #31
    Originally posted by roonius View Post
    Please do not hijack the thread.

    Original request was for breakout strategy development, not about the release date of NT 7.

    Regarding breakout - there is workaround for placing orders in both directions - all you have to do is add additional parameter for entry direction, add a static field and run two instances of the same strategy - one set with "short" direction and another with "long" direction.
    Once one is filled, static field is given some value, based on which - second strategy cancels it's order.

    Roonius,

    Thanks for your weighting into the debate.

    Firstly, apologies if you feel that my intent was to highjack the threat. This start of the conversation with Josh / NT support staff was a simple request for a status update on if this limitation was planning to be fixed in the next release. I was (as were others) less than impressed with the unhelpful responses we were seeing. Unfortunately, it would appear we have uncovered some bad culture in NT. I hope that it will be addressed in the near future.

    Secondly, thank you for your suggestion on the best practice for the work around on the limitation for coding break-outs. Hopefully, now we have this tread back on track. Unfortunately, I’m not sure I understand your solution. It could well be better and more elegant than the one I suggest below.

    My solution was to use onbarupdate() to check the current price, if it was close (e.g. 10 pips if trading forex) to the high-side breakout, then switch on a enterlongstop(). One could then use a int value to continue to track which order is switched on - .e.g. 0 = no order switched on, 1 = long switched on, 2 = short switched on. If price moves away from this towards the low side break out – then switch could be set to 2. I would then leave the relevant value switched on if the current price was within a specific distance from the break out price.

    Please let me say, I have not coded this solution was yet. Once I have done so, I would be happy to share the code excepts when they are in place. Though, I have backed off coding this solution give we don’t know if next week a solution good be in place in NT7.

    I have moved of working on a triple MA cross with ADX filters, mostly based on R C Allen’s initial work - http://www.streetauthority.com/terms/multiplemovingaverages.asp

    Kind regards,

    Dan
    Last edited by drolles; 04-13-2009, 02:49 AM.

    Comment


      #32
      Originally posted by drolles View Post
      My solution was to use onbarupdate() to check the current price, if it was close (e.g. 10 pips if trading forex) to the high-side breakout, then switch on a enterlongstop(). One could then use a int value to continue to track which order is switched on - .e.g. 0 = no order switched on, 1 = long switched on, 2 = short switched on. If price moves away from this towards the low side break out – then switch could be set to 2. I would then leave the relevant value switched on if the current price was within a specific distance from the break out price.

      Kind regards,

      Dan
      That sounds like a good solution too. Thanks for sharing.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Taddypole, 04-26-2024, 02:47 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Eduardo  
      Started by futtrader, 04-21-2024, 01:50 AM
      6 responses
      58 views
      0 likes
      Last Post futtrader  
      Started by sgordet, Today, 11:48 AM
      0 responses
      4 views
      0 likes
      Last Post sgordet
      by sgordet
       
      Started by Trader146, Today, 11:41 AM
      0 responses
      5 views
      0 likes
      Last Post Trader146  
      Started by jpapa, 04-23-2024, 07:22 AM
      2 responses
      19 views
      0 likes
      Last Post rene69851  
      Working...
      X