NinjaTrader_ChrisL - I have looked at the picture that you posted (the one at clauber.tinytake) but I still cannot get my strategy to execute correctly. Am I reading that picture correctly when I think of it this way -- "the close of the current bar + 1 tick is greater than the high of one bar ago." And then, if I have my strategy set to calculate by the tick, then am I to read that as the "close of the current bar" is actually the current price since the current bar isn't closed yet? Am I following that correctly?
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
Intrabar Price Data Access
Collapse
X
-
Intrabar Price Data Access
grande846 did you get this to work? I am a newbie and am stuck here as well.
NinjaTrader_ChrisL - I have looked at the picture that you posted (the one at clauber.tinytake) but I still cannot get my strategy to execute correctly. Am I reading that picture correctly when I think of it this way -- "the close of the current bar + 1 tick is greater than the high of one bar ago." And then, if I have my strategy set to calculate by the tick, then am I to read that as the "close of the current bar" is actually the current price since the current bar isn't closed yet? Am I following that correctly?Tags: None
-
Hello Jim, thanks for your post.
I moved this post from the old thread here:
Regarding using STRATEGY BUILDER (I don't know C# at all), how do I script the condition for triggering a long entry when a bar breaks above any previous bar high after a series of lower high correction bars? Let me phrase it again if you don't follow, in the attached picture, I am looking for long since market forms a swing
If the strategy is running OnEachTick then the Close[0] price will be the last seen price from the bar. Your assumption: "close of the current bar" is actually the current price since the current bar isn't closed yet?" is correct.
If you are seeing incorrect behavior during the strategy backtest, you must enable Tick Replay to get the intrabar price movement historicaly:
Please let me know if I can assist any further.
Chris L.NinjaTrader Customer Service
-
Thanks for the quick reply NinjaTrader_ChrisL . I have enabled tick replay as you suggested but it still isn't working correctly. Is this what you would expect to see?
Comment
-
Hello Jim, thanks for your reply.
How exactly is it not working correctly? Is the strategy missing the signal coming from this condition or are you getting too many signals from this condition? I set up the same thing and added debugging techniques like drawing a dot on the signal and also Printing the price data when a signal shows up e.g.
Doing this will be the best way to resolve issues with custom strategies made within the builder. You can see the out put from the Print statement by going to New> NinjaScript Output.
I look forward to hearing of your results.Chris L.NinjaTrader Customer Service
Comment
-
I am over-looking something and I am sure it is a newbie issue!
Here is what I am doing, I open my Strategy by clicking New, Strategy Builder, and choosing my target strategy. I have edited it to look like this:
I then go back to the Main Window and disable the strategy and then re-enable it so that it refreshes. When I look at the chart, I see this:
It appears to be firing because there was indeed a crossover of the AVG line by the MACD line on the previous bar. But I'd like it to wait until the current price (on the second bar) extends beyond the high of the previous bar (the first bar). In this example, it appears that the entry was made to soon, at the open of the second bar. The Ninjascript Output is not showing my prints when I do it this way - do I need to be doing this in a replay connection for it to show correctly or did I enter it incorrectly?
Comment
-
Hello Jim, thanks for your reply.
Please do a test in the Playback connection and see if you get a different result than on the historical backtest. Another setting to note is the Order Fill Resolution from the Strategy settings. Set this to "High" and select 1 Tick for the series to use. This will fill the orders upon a 1 tick series for more accurate historical intrabar fills. This setting provides a higher resolution series for the Historical Backfill algorithm to use instead of the primary chart series.
The output window should be printing something if the condition became true. I attached my test script for you to try out on your system. This strategy produces output. To import it go to Tools>Import>Ninjascript Addon.
I look forward to assisting.Attached FilesChris L.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by proptradingshop, 03-21-2024, 09:50 AM
|
5 responses
26 views
0 likes
|
Last Post Today, 05:17 AM | ||
Started by MaupinFinche, Today, 05:08 AM
|
0 responses
2 views
0 likes
|
Last Post
by MaupinFinche
Today, 05:08 AM
|
||
Started by Enkidu, Yesterday, 06:40 AM
|
9 responses
35 views
0 likes
|
Last Post
by Enkidu
Yesterday, 01:11 PM
|
||
Started by Mestor, 03-10-2023, 01:50 AM
|
12 responses
307 views
0 likes
|
Last Post
by z.franck
Today, 04:29 AM
|
||
Started by AgriTrdr, 07-16-2023, 12:54 PM
|
32 responses
268 views
0 likes
|
Last Post
by f.saeidi
Yesterday, 06:49 AM
|
Comment