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!
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
NinjaTrader
Booking in second timeframe doesn't vary with period value
Collapse
X
-
Booking in second timeframe doesn't vary with period value
I created a multiframe strategy where I book trades on the second period, for example, of type Second, value 1. I made the period value a variable parameter. When I test this strategy in SA I get different results depending on the period value, however when I test it in Market Replay (x500) the results are all the same. Is this intentional or is it a bug? Strategy attached. -
Hi Bertrand,
I want to make sure you understand my question. I vary the bars period on which I am booking trades, but whether it's 1 or 200 seconds the trades get booked the same. I expect that if the period is 200 seconds, then the trade would get booked at the open of the next 200 second bar.
Comment
-
Sorry, I am not sure if you agree or disagree with me.
Originally posted by NinjaTrader_Bertrand View PostThanks, yes understood - in Market Replay I would expect those results.
For back-testing the variation would be seen, as it depends to which series you submit for an intrabar fill simulation.
What I want to be able to do here is have a controlled delay before the trade is booked. So if I submit a trade against a 5 second period, I want the trade to book after at least 5 seconds have elapsed.
Thanks,
Tim
Comment
-
Tim, what I meant was: I would expect the differences you saw in your first post - you do not introduce any delay here with the code you have, as it's the same series in realtime you submit to - you have not coded in to wait for a bar update on the smaller series and only then submit.BertrandNinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_Bertrand View Postyou have not coded in to wait for a bar update on the smaller series and only then submit.
Thanks,
Tim
Comment
-
Tim, would not have a sample or post to refer you to unfortunately. You would be looking into creating for example a flag that allows to enter in BIP0 and then you would monitor for a bar update in your BIP3 (or whatever series you wish) and then Enter if the flag permits and reset it's state.BertrandNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by knighty6508, 05-10-2024, 01:20 AM
|
4 responses
26 views
0 likes
|
Last Post
by knighty6508
Today, 05:29 AM
|
||
Started by OllieFeraher, 05-09-2024, 11:14 AM
|
6 responses
19 views
0 likes
|
Last Post
by OllieFeraher
Today, 04:00 AM
|
||
Started by PaulMohn, 05-02-2024, 06:59 PM
|
2 responses
44 views
0 likes
|
Last Post
by PaulMohn
Today, 03:51 AM
|
||
Started by ETFVoyageur, Today, 02:10 AM
|
0 responses
17 views
0 likes
|
Last Post
by ETFVoyageur
Today, 02:10 AM
|
||
Started by rayyyu12, Today, 12:47 AM
|
0 responses
12 views
0 likes
|
Last Post
by rayyyu12
Today, 12:47 AM
|
Comment