- Platform
-
- NinjaTrader
Hi Guys,
I have a thinkorswim indicator that I input selected levels for the /ES and was wondering if anyone could help me convert, if possible, to NT8. I have been manually plotting these lines with a horizontal line on NT8 everyday although it would be easier to input them on the properties side of the indicator. If anyone is able to convert this, much appreciated and thank you in advance!
Below is the code for the thinkorswim indicator:
declare upper;
declare once_per_bar;
input ES_R5 = 0.0;
input ES_R4 = 0.0;
input ES_R3 = 0.0;
input ES_R2 = 0.0;
input ES_R1 = 0.0;
input ES_S1 = 0.0;
input ES_S2 = 0.0;
input ES_S3 = 0.0;
input ES_S4 = 0.0;
input ES_S5 = 0.0;
plot ESR1 = if GetSymbol() == "/ES:XCME" and ES_R1 > 0.0 THEN ES_R1 else Double.NaN;
plot ESR2 = if GetSymbol() == "/ES:XCME" and ES_R2 > 0.0 THEN ES_R2 else Double.NaN;
plot ESR3 = if GetSymbol() == "/ES:XCME" and ES_R3 > 0.0 THEN ES_R3 else Double.NaN;
plot ESR4 = if GetSymbol() == "/ES:XCME" and ES_R4 > 0.0 THEN ES_R4 else Double.NaN;
plot ESR5 = if GetSymbol() == "/ES:XCME" and ES_R5 > 0.0 THEN ES_R5 else Double.NaN;
plot ESS1 = if GetSymbol() == "/ES:XCME" and ES_S1 > 0.0 THEN ES_S1 else Double.NaN;
plot ESS2 = if GetSymbol() == "/ES:XCME" and ES_S2 > 0.0 THEN ES_S2 else Double.NaN;
plot ESS3 = if GetSymbol() == "/ES:XCME" and ES_S3 > 0.0 THEN ES_S3 else Double.NaN;
plot ESS4 = if GetSymbol() == "/ES:XCME" and ES_S4 > 0.0 THEN ES_S4 else Double.NaN;
plot ESS5 = if GetSymbol() == "/ES:XCME" and ES_S5 > 0.0 THEN ES_S5 else Double.NaN;
ESR1.SetDefaultColor(Color.WHITE);
ESR2.SetDefaultColor(Color.WHITE);
ESR3.SetDefaultColor(Color.WHITE);
ESR4.SetDefaultColor(Color.WHITE);
ESR5.SetDefaultColor(Color.WHITE);
ESS1.SetDefaultColor(Color.WHITE);
ESS2.SetDefaultColor(Color.WHITE);
ESS3.SetDefaultColor(Color.WHITE);
ESS4.SetDefaultColor(Color.WHITE);
ESS5.SetDefaultColor(Color.WHITE);
I have a thinkorswim indicator that I input selected levels for the /ES and was wondering if anyone could help me convert, if possible, to NT8. I have been manually plotting these lines with a horizontal line on NT8 everyday although it would be easier to input them on the properties side of the indicator. If anyone is able to convert this, much appreciated and thank you in advance!
Below is the code for the thinkorswim indicator:
declare upper;
declare once_per_bar;
input ES_R5 = 0.0;
input ES_R4 = 0.0;
input ES_R3 = 0.0;
input ES_R2 = 0.0;
input ES_R1 = 0.0;
input ES_S1 = 0.0;
input ES_S2 = 0.0;
input ES_S3 = 0.0;
input ES_S4 = 0.0;
input ES_S5 = 0.0;
plot ESR1 = if GetSymbol() == "/ES:XCME" and ES_R1 > 0.0 THEN ES_R1 else Double.NaN;
plot ESR2 = if GetSymbol() == "/ES:XCME" and ES_R2 > 0.0 THEN ES_R2 else Double.NaN;
plot ESR3 = if GetSymbol() == "/ES:XCME" and ES_R3 > 0.0 THEN ES_R3 else Double.NaN;
plot ESR4 = if GetSymbol() == "/ES:XCME" and ES_R4 > 0.0 THEN ES_R4 else Double.NaN;
plot ESR5 = if GetSymbol() == "/ES:XCME" and ES_R5 > 0.0 THEN ES_R5 else Double.NaN;
plot ESS1 = if GetSymbol() == "/ES:XCME" and ES_S1 > 0.0 THEN ES_S1 else Double.NaN;
plot ESS2 = if GetSymbol() == "/ES:XCME" and ES_S2 > 0.0 THEN ES_S2 else Double.NaN;
plot ESS3 = if GetSymbol() == "/ES:XCME" and ES_S3 > 0.0 THEN ES_S3 else Double.NaN;
plot ESS4 = if GetSymbol() == "/ES:XCME" and ES_S4 > 0.0 THEN ES_S4 else Double.NaN;
plot ESS5 = if GetSymbol() == "/ES:XCME" and ES_S5 > 0.0 THEN ES_S5 else Double.NaN;
ESR1.SetDefaultColor(Color.WHITE);
ESR2.SetDefaultColor(Color.WHITE);
ESR3.SetDefaultColor(Color.WHITE);
ESR4.SetDefaultColor(Color.WHITE);
ESR5.SetDefaultColor(Color.WHITE);
ESS1.SetDefaultColor(Color.WHITE);
ESS2.SetDefaultColor(Color.WHITE);
ESS3.SetDefaultColor(Color.WHITE);
ESS4.SetDefaultColor(Color.WHITE);
ESS5.SetDefaultColor(Color.WHITE);