I not so patiently wait for the implementation of said feature. You are the bomb!
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
TAoS&C Sub-Forum Suggestion
Collapse
X
-
Multilevel Strategy by Valdimir Voznjuk(Sept S&C)plotting sensitivity thresholds-pg29
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.
Comment
-
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--> $CHFUSDMatthewNinjaTrader Product Management
Comment
-
Multilevel Strategy by Valdimir Voznjuk(Sept S&C)plotting sensitivity thresholds-pg29
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
Comment
-
Multilevel Strategy by Valdimir Voznjuk(Sept S&C)plotting sensitivity thresholds-pg29
Here is a screenshot of page 29 also showing what the plot should look like. And indeed the entire article
Multi Level Strat.doc
Comment
-
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?MatthewNinjaTrader Product Management
Comment
-
Multilevel Strategy by Valdimir Voznjuk(Sept S&C)plotting sensitivity thresholds-pg2
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?
Comment
-
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 [B]Values[1]; [/B]} } [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 [B]Values[2];[/B] } }
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.JoydeepNinjaTrader Customer Service
Comment
-
Multilevel Strategy by Valdimir Voznjuk(Sept S&C)plotting sensitivity thresholds
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.
Comment
-
Multilevel Strategy by Valdimir Voznjuk - Valdimir's solution
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.
Comment
-
Hello maz100,
When I try applying the indicator on the chart then I am getting the following error message.
Please refer to this post which discusses the reasons for such scenario.Error on calling 'OnBarUpdate' method for indicator 'multiJPY' on bar 0: You are accessing an index with a value that is invalid since its out of range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.
JoydeepNinjaTrader Customer Service
Comment
-
You turn it into a Parameter, and set the value from the User Dialog.Originally posted by maz100 View PostI 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.
Comment
-
Error on calling 'OnBarUpdate' method for indicator 'multiJPY'
I am afraid I don't even have a Short-term solution - by changing the 1 in the first line to 60.Originally posted by maz100 View Post....... instead of making multiple copies? But at least I have a short-term solution.

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.Attached Files
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
591 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
343 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
556 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
553 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment