![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: May 2010
Posts: 51
Thanks: 1
Thanked 0 times in 0 posts
|
hello,
Using the strategy wizard, is it possible to buy (or sell at the top) next bar at market when the zig zag indicator shows the blue line down at the botton of the market? I was trying to get that logic work out using the wizard but I dont really know how. Anybody tried to code a strategy using the zig zag? Thanks for any help! Alan |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hello futuros,
Welcome to the NinjaTrader forums. Zig zag will return a numeric value and you can make comparisons with ZigZag to price data. Please see the help guide article below, on using the condition builder for indicator to value comparisons. http://www.ninjatrader-support.com/H...mparisons.html On the right side of this comparison you could select instead price data.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: May 2010
Posts: 51
Thanks: 1
Thanked 0 times in 0 posts
|
Thanks Ryan, If I put a deviation value 0f 3.0 do you have an idea what numeric value will result so Zig Zag will give a buy or sell signal?
Thanks again, Alan |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Not sure what value would result.
You can Save a modified version of this indicator by right clicking > Save As and giving it a new name. You can then use Print() statement to see the values through the Tools > output window. Print("High Series: " + zigZagHighSeries); Print("Low Series: " + zigZagLowSeries);
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: May 2010
Posts: 51
Thanks: 1
Thanked 0 times in 0 posts
|
OK Ryan, I got the new indicator ZigZagAlan, where do I put the Print() statement, inside the code? or in the output window?
|
|
|
|
|
|
#6 |
|
Member
Join Date: May 2010
Posts: 51
Thanks: 1
Thanked 0 times in 0 posts
|
Hi Ryan, I got it (put it in the indicator's code) but is giving me the value of the index (sp500) where the ZigZag is changing position (from long to short and viceversa) but is not giving me an indicator value, like the ADX above 20 for example, how do I fix that?
Thanks, Alan |
|
|
|
|
|
#7 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hi Futuros,
You're looking at the indicator value. It follows closely with price.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Jun 2010
Posts: 13
Thanks: 0
Thanked 0 times in 0 posts
|
I am trying to use the zigzag indicator in a strategy with some other indicators and would like to detect when the zigzag is hit(or when the trend line is drawn or trend changes). How would I set it up in the strategy wizard using the indicator.
================================================== ========= I have tried several different ways as suggested in these posts to detect a change in direction using the wizard to create a strategy to signal buy and sell points, Backtesting comes up with 0 trades. Any suggestion will help. I am not a programmer. Thanks! Stan. |
|
|
|
|
|
#9 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
I am jumping in here, but I will try to assist. The zigzag redraws and is difficult to use programatically. It is meant only for visual observation. However to see how ZigZag changes dynamically, Print() the values you are using from it and see how they change in live market conditions. That may help.
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#10 |
|
Junior Member
Join Date: Jun 2010
Posts: 13
Thanks: 0
Thanked 0 times in 0 posts
|
Hello Ben,
Thanks for your response, I do realise and am aware that zigzag alone cannot be used for buy/sell strategies. Therefore I want to use zigzag as one of the indicators and would help as a confirmation for even a temporary change in direction. I have used this strategy on an other platform successfully and am trying to port the concept and build it in Ninja Trader using the Wizard. I would like to see the "trendDir" value and the High/Low Price on the Condition Builder so I can compare values. Appreciate your guidance. Stan.
Last edited by Stan01; 06-27-2010 at 11:48 AM.
|
|
|
|
|
|
#11 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
I am sorry, this would need to be programmed in custom as a plot. You only have the low and high available.
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#12 |
|
Junior Member
Join Date: Jun 2010
Posts: 13
Thanks: 0
Thanked 0 times in 0 posts
|
And how do you access the low and high that is available.
|
|
|
|
|
|
#13 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hello Stan01,
Attached is a screenshot showing how to select Zig Zag from the list of indicators in the condition builder. You can select either the ZigZagHigh or ZigZagLow plot. See here for the help guide article on selecting individual plots through the condition builder.
Ryan M
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| zigzag | mullum | Automated Trading | 10 | 06-17-2011 12:12 AM |
| zigzag problem | Creamers | Indicator Development | 5 | 08-01-2008 02:46 AM |
| ZigZag on last bar | ssierra | NinjaScript File Sharing Discussion | 3 | 02-02-2008 01:33 AM |
| ZigZag with labels | dkelly | NinjaScript File Sharing Discussion | 3 | 01-25-2008 11:03 AM |
| ZigZag not visible | JonesWooHoo | Charting | 2 | 10-08-2007 05:42 PM |