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
ZigZag barsAgo
Collapse
X
-
M,
Your screenshot shows a chart with a NinjaScript Output window displaying what is supposedly your codes output. We would need to see some code along with that output to know why you are getting these specific results
-
Hi Josh, I attached the strategy in my initial post, you can see the print code which is in it.
Thanks
M
Leave a comment:
-
Hello mntemel,
Thanks for your post.
We would need to see the code for your Print() to know what was happening specifically
Leave a comment:
-
ZigZag barsAgo
Hi I've been trying to define previous highs and lows by using ZigZag's inbuilt barsAgo function but haven't been able to succeed. Here is the link for the definition in case anyone's interested
Attached is a simple strategy that plots the ZigZag indicator and prints with bars ago numbers for the previous highs and lows. My understanding is on each bar you can tell "how many bars ago you had the previous high, or the one before that, etc..) I'm applying this to a CL 07-19 contract 200 volume chart in case you want to replicate the case.
In the attached image, you'll see I marked the Bar at 18:51:59. According to the Print, while at that bar, the previous high was 7 bars ago which seems correct, but the print says the high before that was 12 bars ago which seems incorrect.
Could you please tell me where i'm going wrong here?
Thanks
MTags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, 04-17-2024, 06:40 PM
|
6 responses
49 views
0 likes
|
Last Post
by algospoke
Today, 06:18 PM
|
||
Started by arvidvanstaey, Today, 02:19 PM
|
4 responses
11 views
0 likes
|
Last Post Today, 04:08 PM | ||
Started by samish18, 04-17-2024, 08:57 AM
|
16 responses
61 views
0 likes
|
Last Post
by samish18
Today, 03:30 PM
|
||
Started by jordanq2, Today, 03:10 PM
|
2 responses
11 views
0 likes
|
Last Post
by jordanq2
Today, 03:23 PM
|
||
Started by traderqz, Today, 12:06 AM
|
10 responses
21 views
0 likes
|
Last Post
by traderqz
Today, 02:49 PM
|
Leave a comment: