![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Suggestions And Feedback New feature suggestions and feedback. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#16 |
|
Senior Member
Join Date: Jan 2010
Posts: 182
Thanks: 24
Thanked 1 time in 1 post
|
|
|
|
|
|
|
#17 |
|
Member
Join Date: Sep 2008
Posts: 51
Thanks: 0
Thanked 2 times in 2 posts
|
Is there code anywhere in the forum from the S&C September article "Developing A Multilevel Strategy" ? The author created the strategy using Ninja Trader.
Last edited by LTWCI; 08-29-2012 at 01:02 PM.
|
|
|
|
|
The following user says thank you to LTWCI for this post: |
|
|
|
#18 |
|
NinjaTrader Customer Service
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
|
Hello,
We did not code this one since the article already had NT code in it. If you review the article you would be able to copy the code to create the indicator or contact the author directly to get the direct source code from him. -Brett
Brett
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Brett for this post: |
|
|
|
#19 |
|
Junior Member
|
Hi Brett,
I did use the code(s) for Multilevel Strategy, written by Valdimir Vladimirovich Voznjuk, via the link shown at the end of his article in the S&C Magazine (Sept.2012). However, I could not reproduce the plots shown in Figure 1 & 2 on age 29. I created a new JPY/USD stop chart and used the multiJPY indicator on it; But I got a flat line in pane 2, and nowhere near anything shown in plot 1 on page 29. I have inserted his two lines of code in the initiaization section. ie :- Add(new Line(System.Drawing.Color.DarkViolet, -0.01, Lower)); Add(new Line(System. Drawing.Color.YellowGreen, 0.01, Upper)); .....and the indicator complied fine with NO errors! I did email Valdimir for help on this matter, but he did not reply (He did reply to my first email which help me insert the code above into the Initiaization section) I have attached a chart image of the result, and MY multiJPY indicator.$USDJPY (15 Min) 21_12_2012.jpg multiJPY.cs Please could you help me achieve the plot on page 29 on my study pane? Much appreciated. |
|
|
|
|
|
#20 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,794
Thanks: 160
Thanked 568 times in 559 posts
|
Hello,
In the .cs file you attahced, the Add() method is referencing the 6J 06-11, 6B 06-11, and 6S 06-11 contracts which have expired. I'd suggest changing these to the current 03-13 contracts. Also make sure you have intraday Futures data for these contracts or the plot will not be calculated. If you do not have futures data, you can change these from the Futures to the spot Forex: 6J --> $JPYUSD 6B--> $GBPUSD 6S--> $CHFUSD
Matthew
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Matthew for this post: |
|
|
|
#21 |
|
Junior Member
|
Hi Matthew,
Thanks for your reply. I only trade the Forex currencies, and hence I changed the 6J 06-11, 6B 06-11, 6S 06-11....to $JPYUSD, $GBPUSD, $CHFUSD exactly. However, I still get a flat line plot under the 1 min time frame. And I observed I get NO line plotted at all using the 5,15 or 60m time-frames. I tried first using the $JPYUSD, then other currencies, with exactly the same results. Do I need to change the letter z and bp, into something else from from line 92 onwards? I also notice under Misc. of the multiJPY indicator, the narrative Plot 1 and Plot 2 is greyed out. Does that mean I have not inserted the code in the correct place? Do they need to me functioning properly for this indicator to work? I would really like to grasp the meaning of this plot before I go on to build the actual strategy associated with this study article. Any help will be greatly appreciated..!! The multiJPY Indicator and 1 min Jap Yen Chart attached multiJPY.cs $USDJPY (1 Min) 04_01_2013.jpg |
|
|
|
|
|
#22 |
|
Junior Member
|
Here is a screenshot of page 29 also showing what the plot should look like. And indeed the entire article
Attachment 24392 Multi Level Strat.doc |
|
|
|
|
|
#23 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,794
Thanks: 160
Thanked 568 times in 559 posts
|
From your code, you've initially set z=0;
I'm a little confused on what you're doing vs what the article shows. Why have you added the GBPUSD and USDCHF as well? Do you want all of these to be plotted on the same chart? Or do you only want the GBPUSD plotted if you're using that instrument? I.e., How many plots do you want? Just one or 3?
Matthew
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Matthew for this post: |
|
|
|
#24 |
|
Junior Member
|
Hi Matthew,Let me approach this step-by-step and steadily and follow the article as closely as possible. First of all. let, let me try to achieve the plot in figure 1 on page 29. This shows the MultiJPY indicator on a one minute time frame. Correct me if I am wrong, but the code for the Upper and lower lines are written in my "MultiJPY"Indicator as: - Add(new Line(System.Drawing.Color.DarkViolet, -0.02, "Lower")); Add(new Line(System.Drawing.Color.YellowGreen, 0.02, "Upper")); (in Lines 44 and 45 respectively) These lines of code were given in the download, as given via the link on the article - specifically for Ninja users. Furthermore, also in the entire code was ALL 3 currency pairs (in lines 47 to 51): - Add("6J 06-11", PeriodType.Minute, 1); Add("6J 06-11", PeriodType.Minute, 5); Add("6J 06-11", PeriodType.Minute, 15); Add("6J 06-11", PeriodType.Minute, 30); Add("6J 06-11", PeriodType.Minute, 60); [And the same as above below these lines for 6B 06-11 AND 6S 06-11) This was also in the downloadable code - I did not add them. (in lines 53 to 63) As per our forum thread on 01-03-2013, 01:40 PM, I have changed the futures symbol's 6J, 6B and 6S to:- $JPYUSD $GBPUSD $CHFUSD So in order to achieve the plot, with two horizontal lines, and a fluctuating line, shown in figure 1 on page 29, what should I do? Should I, in my code, delete the lines below, or either insert // in front of them (thus making them obsolete in the code)? : - Add("$GBPUSD", PeriodType.Minute, 1); Add("$GBPUSD", PeriodType.Minute, 5); Add("$GBPUSD", PeriodType.Minute, 15); Add("$GBPUSD", PeriodType.Minute, 30); Add("$GBPUSD", PeriodType.Minute, 60); Add("$USDCHF", PeriodType.Minute, 1); Add("$USDCHF", PeriodType.Minute, 5); Add("$USDCHF", PeriodType.Minute, 15); Add("$USDCHF", PeriodType.Minute, 30); Add("$USDCHF", PeriodType.Minute, 60); And do I need to change set z=0 somehow to make the plot work? To summarise, and at this first stage, I am try to create just 1 plot, as depicted in figure 1 on page 29. It shows 2 horizontal lines, the lower one being Dark Violet and the upper one being Yellow Green (as per given code); with a solid (indicator) line that moves through the middle, which may spike above the upper line, and dips below the lower horizontal line (as shown in figure 1). Note: Both my MultiJPY code and page 29 of article is attached showing Figure 1. I will then attempt to plot Figure 2: "Plotting Indicator for One-Way pairs" next; unless you already know and can Preempt my question? |
|
|
|
|
|
#25 |
|
NinjaTrader Customer Service
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
|
Hello maz100,
You havent added or referenced to the Plot1 and Plot2. Please add the following code in the initialize section of the code to add the 2 plots Code:
Add(new Plot(Color.Black, "Plot1")); Add(new Plot(Color.Black, "Plot2")) Further more you have to reference the properties accordinly. Please modify the properties section of the code as Code:
[Browsable(false)] // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
public DataSeries Plot1
{
get { return Values[1]; }
}
[Browsable(false)] // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
public DataSeries Plot2
{
get { return Values[2]; }
}
Also you seems to have added redundant Lines. Upper and Lower lines has been added twice. I would further suggest, to seek clarification from the author on how exactly the logic is referenced in the code.
Joydeep M.
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Joydeep for this post: |
|
|
|
#26 |
|
Junior Member
|
Hi Joydeep in India,
![]() Your reply was much appreciated and I am glad to say I have been able to make some progress because of it. With the help of a programmer, I added the code as instructed, and deleted some lines that were not necessary. The code is attached here and an image of the 1 minute chart of the Japanese Yen Spot price, and MultiJPY indicator plot shown also. The indicator does work on the 1 minute time frame. The premise is that each time the line crossed the centre line - then there is likely a change of direction. I wanted to look at a 1 hour time frame (60 minutes),as to avoid the very obvious whipsaws that would occur in the 1 minute time frame. However, if I change the time frame to 60 mins, then the indicator will not work at all. I cannot see any lines in the study pane below the prices. In fact it does NOT work in any other time frame, apart from the 1 minute one. I have attempted to remove the MultiJPY indicator and re-apply it while it the 60 minute time frame, but this did NOT help the MultiJPY indicator to function either. (screen shot attached) In Valdimir Voznjuk article of Sept 2012 in S&C magazine, it does mention on page 29 that other time frames could be employed. The written text says: - You should also add a buffer so that you can implement the indicator on a variety of time frames for the USD/JPY: Add(6J 06-11, PeriodType.Minute, 1); Add(6J 06-11, PeriodType.Minute, 5); Add(6J 06-11, PeriodType.Minute, 15); Add(6J 06-11, PeriodType.Minute, 30); Add(6J 06-11, PeriodType.Minute, 60); (Obviously where is written "6J 06-11" , mine is "$USDJPY" for spot prices) Is there anything in the code that disable's the study to work in a higher time frame? And while it only works in the 1 minute time frame? As a trader/investor, I would only look at higher time frames to get the bigger picture of the trend - and hence a change of trend - hopefully using the MultiJPY indicator - which is the intention of the indicator. Any help will be greatly appreciated. |
|
|
|
|
|
#27 |
|
Junior Member
|
I have received an email from the author
He says:-"You can create few copies of this indicator, for each time frame. For example, indicator60 for 60 minutes time frame, and you should change first line in init section where add buffer option change 1 to 60. It will be most stable solution" ![]() Does anyone know how this can be incorporated into just ONE indicator, instead of making multiple copies? But at least I have a short-term solution.
|
|
|
|
|
|
#28 | |
|
NinjaTrader Customer Service
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
|
Hello maz100,
When I try applying the indicator on the chart then I am getting the following error message. Quote:
http://ninjatrader.com/support/forum...ead.php?t=3170
Joydeep M.
NinjaTrader Customer Service |
|
|
|
|
|
The following user says thank you to NinjaTrader_Joydeep for this post: |
|
|
|
#29 | |
|
Senior Member
|
Quote:
|
|
|
|
|
|
The following user says thank you to koganam for this post: |
|
|
|
#30 | |
|
Junior Member
|
Quote:
![]() I looked at the link provided by NinjaTrader_Joydeep: - http://ninjatrader.com/support/forum...ead.php?t=3170 But am not sure at all where to place the code given within that link in my Indicator to fix it. (I have made attempts). Please could you put it in the right of the code and fix it permanently? I did email the author twice for help and directed him to this forum thread, but he has not replied. Much appreciated for any forum help given ![]() PS: Is anyone successfully using his code to trade 2 pairs? Either same directional pairs (ie, Euro and GBP) or opposite directional pairs (Euro and Swiss) MultiJPY indicator attached.
Last edited by maz100; 02-12-2013 at 09:49 AM.
Reason: Missed smiley
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Suggestion: Add links from Help files to Forum | sajosh | Suggestions And Feedback | 1 | 03-30-2011 11:51 PM |
| Is there a forum for indicators covered in S&C? | thuff | Indicator Development | 6 | 11-10-2010 02:35 PM |
| Forum Search Engine OLD & Prehistorical...!!!! | mktrend | Suggestions And Feedback | 5 | 03-23-2009 06:17 PM |
| Forum Suggestion - Strategy Wizard Only | daven | Suggestions And Feedback | 1 | 08-17-2008 12:13 PM |
| Suggestion - User Supported Coding/Help Forum | zoltran | General Programming | 3 | 12-17-2007 08:11 AM |