Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
CPR indicator
Collapse
X
-
Hello hir04068,
Drawing Tools are not used in this indicator. The indicator overrides the OnRender method and performs its own drawings with SharpDX. To get some further direction on using SharpDX for custom rendering, please see our SampleCustomRender example as well as the documentation below.
Using SharpDX for Custom Rendering - https://ninjatrader.com/support/help..._rendering.htm
The lines are drawn with RenderTarget.DrawLine. To recreate an extended line, you will want to modify how coordinates supplied to this method to create the same effect as an ExtendedLine. You may also reference the Lines Drawing Tool source code to see how the Drawing Tool draws ExtendedLines with SharpDX.
We look forward to being of further assistance.
Leave a comment:
-
I have interchanged the formula and its working perfect now.Originally posted by NinjaTrader_Jim View PostHello hir04068,
Debugging steps will need to be taken to check the values used to calculate pl. If pl depends on ph being up to date, pl should be calculated after ph.
Please let us know if you have any questions.
thanks a ton for all the help you have provided.
if anyone wants CRP indicator then I hope this will help. I am posting the final indicator and template I use for the intraday chart.Attached Files
- Likes 1
Leave a comment:
-
Hello hir04068,
Debugging steps will need to be taken to check the values used to calculate pl. If pl depends on ph being up to date, pl should be calculated after ph.
Please let us know if you have any questions.
Leave a comment:
-
BC/ph and pp value is coming out perfect.
that is why I am confused why pl is not coming properly.
Leave a comment:
-
Hello hir04068,
You will want to check how the value is assigned and that proper order of operations have taken place. For example, if pl is supposed to be TC as described in post 3, then we must keep in mind that this value depends on BC/ph. BC/ph would then need to be set first in order for the pl/TC calculation to be correct.
Ultimately, debugging steps should be taken to print out the values used to evaluate each variable so you can break down the math used for the calculation and ensure that the math is set up correctly.
Debugging tips - https://ninjatrader.com/support/help...script_cod.htm
We look forward to assisting.
Leave a comment:
-
hello,Originally posted by NinjaTrader_Jim View PostHello hir04068,
The compile errors are letting you know that you are creating a duplicate PivotsTypeConverter and that HLCCalculationMode as well as PivotRange are duplicated. You will need to create unique versions of this TypeConverter and enums to get the script to work.
It may be helpful if you compared a working modification to the Pivots indicator against the original to better understand what steps need to be taken to create a new version of this script. You could use an publicly available tool like DiffChecker to check for differences.
Compare text, files, and code (e.g. json, xml) to find differences with Diffchecker online for free! Use our desktop app for private, offline diffs.
SvePivots NT8 - https://ninjatraderecosystem.com/use...indicator-nt8/
The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
Please let us know if you have any questions.
i installed 'ntsvepivots' inidicator and change some formula in that. i am using new formula for "pl" and "ph"
pp = (currentHigh + currentLow + currentClose) / 3;
s1 = 2 * pp - currentHigh;
r1 = 2 * pp - currentLow;
s2 = pp - (currentHigh - currentLow);
r2 = pp + (currentHigh - currentLow);
s3 = pp - 2 * (currentHigh - currentLow);
r3 = pp + 2 * (currentHigh - currentLow);
pl = pp + (pp - ph);
s1m = (pp - s1) / 2 + s1;
r1m = (r1 - pp) / 2 + pp;
s2m = (s1 - s2) / 2 + s2;
r2m = (r2 - r1) / 2 + r1;
s3m = (s2 - s3) / 2 + s3;
r3m = (r3 - r2) / 2 + r2;
ph = (currentHigh + currentLow)/2;
now i am geting "ph" value perfect but "pl" value is not coming correct.
i dont see error when i am compiling the indicator.
please help.
thanks
Leave a comment:
-
Hello hir04068,
The compile errors are letting you know that you are creating a duplicate PivotsTypeConverter and that HLCCalculationMode as well as PivotRange are duplicated. You will need to create unique versions of this TypeConverter and enums to get the script to work.
It may be helpful if you compared a working modification to the Pivots indicator against the original to better understand what steps need to be taken to create a new version of this script. You could use an publicly available tool like DiffChecker to check for differences.
Compare text, files, and code (e.g. json, xml) to find differences with Diffchecker online for free! Use our desktop app for private, offline diffs.
SvePivots NT8 - https://ninjatraderecosystem.com/use...indicator-nt8/
The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
Please let us know if you have any questions.Last edited by NinjaTrader_Jim; 11-29-2019, 10:52 AM.
Leave a comment:
-
HELLO,
I tried to edit the default pivot indicator by creating a new indicator and then added the new lines plot and formula. I am getting the error with this one, which I was expecting as I was just trying to create something I don't know. please, can you look into this code?
Attached Files
Leave a comment:
-
hi,Originally posted by NinjaTrader_Jesse View PostHello hir04068,
I am not aware of this calculation myself, if any forum members are I am sure they will reply as well.
You could certainly do these type of calculations in a script, what you provided could be written as:
Code:TC = (Pivot – BC) + Pivot // this line does not provide enough detail on what data is needed, is this the prior bar values? this is being checked before the value Pivot or BC are set
would be:Code:Pivot = (High + Low + Close)/3 {its already avalible in nt8 ,so dont need this line}
Code:Pivot[0] = Typical[0];
and then
Code:BC[0] = (High[0] + Low[0])/2; [I][/I]
These are assuming you have added a plot for TC Pivot and BC, plots can be added using the steps in the following page: https://ninjatrader.com/support/help...ghtsub=addplot
I look forward to being of further assistance.
I have very low knowledge of coding so I will require more help from you. thanks in advance.
can we add these levels in default pivot indicator provided in nt8? so it can draw this line also....
TC = (Pivot – BC) + Pivot
BC = (High + Low)/2
Leave a comment:
-
Hello hir04068,
I am not aware of this calculation myself, if any forum members are I am sure they will reply as well.
You could certainly do these type of calculations in a script, what you provided could be written as:
Code:TC = (Pivot – BC) + Pivot // this line does not provide enough detail on what data is needed, is this the prior bar values? this is being checked before the value Pivot or BC are set
would be:Code:Pivot = (High + Low + Close)/3 {its already avalible in nt8 ,so dont need this line}
Code:Pivot[0] = Typical[0];
and then
Code:BC[0] = (High[0] + Low[0])/2; [I][/I]
These are assuming you have added a plot for TC Pivot and BC, plots can be added using the steps in the following page: https://ninjatrader.com/support/help...ghtsub=addplot
I look forward to being of further assistance.
Leave a comment:
-
CPR indicator
hello,
Does dose anyone know about CPR (central pivot range) indicator for NT8?
if not can someone help me in coding it for nt8?
it requires 3line to draw
with the formula::
TC = (Pivot – BC) + Pivot
Pivot = (High + Low + Close)/3 {its already avalible in nt8 ,so dont need this line}
BC = (High + Low)/2Tags: None
- Likes 1
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
63 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
91 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
48 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
105 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
63 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Leave a comment: