Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Position Close and Opening next position on the same bar

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

  • NinjaTrader_Bertrand
    replied
    Thanks for the post Mike.

    The Enter() methods would reverse automatically for you - from the timing perspective it would depend on which events you're issueing the orders. With OnBarUpdate() and CalculateOnBarClose set to 'true' it would be processed ear bar only, however you could set CalculateOnBarClose to false and then you could process events on each tick in realtime / market replay.

    If you wish to work for example on the exact fill report / event of an order, then you would need to look into issueing those commands from OnExecution() - this method would be called for each incoming execution and would not be tied to the bars update timing.

    A reference sample for working those more advanced concepts could be reviewed here - http://www.ninjatrader.com/support/f...ead.php?t=7499

    Content rich NinjaScript help generally is directly available in the software, just press F1 and review the NinjaScript / Language Reference section.

    Leave a comment:


  • Position Close and Opening next position on the same bar

    Hello, I would like to ask about the following question:

    Let's assume I have 1000L exposition in EURUSD. I would like to gain exposition of 1000S: that is "close" position of 1000L and open 1000S. How to do it the quickest way? Especially, I would like not to wait for a new bar to come in order to open 1000s after closing 1000L.

    If there is any related topic in help, maybe you could suggest where to look for it.

    Thanks in advance,
    Mike

Latest Posts

Collapse

Topics Statistics Last Post
Started by ezrollin, Today, 11:17 PM
0 responses
1 view
0 likes
Last Post ezrollin  
Started by grasshopperguru79, Today, 09:09 PM
1 response
22 views
0 likes
Last Post NinjaTrader_EricB  
Started by Barry Milan, Today, 07:52 PM
1 response
8 views
0 likes
Last Post NinjaTrader_EricB  
Started by BarzTrading, 11-07-2018, 09:50 PM
4 responses
388 views
0 likes
Last Post quantismo  
Started by justanewbe, Today, 06:31 PM
8 responses
37 views
0 likes
Last Post justanewbe  
Working...
X