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 hazylizard, Today, 08:38 AM
0 responses
1 view
0 likes
Last Post hazylizard  
Started by Max238, Today, 01:28 AM
5 responses
42 views
0 likes
Last Post Max238
by Max238
 
Started by giulyko00, Yesterday, 12:03 PM
3 responses
12 views
0 likes
Last Post NinjaTrader_BrandonH  
Started by habeebft, Today, 07:27 AM
1 response
14 views
0 likes
Last Post NinjaTrader_ChristopherS  
Started by AveryFlynn, Today, 04:57 AM
1 response
12 views
0 likes
Last Post NinjaTrader_Erick  
Working...
X