Can someone with C# experience please translate the following code from a TOS indicator i had created? It basically paints a constant line on a new panel at 0 (zeroline) which changes colors depending on the if-then-else criteria. I wrote them in TOS hacking off of the CCI woodies sidewinders but having a tough time getting it translated to NT. Perhaps you could provide me some initial code?
Very much appreciated and thanks in advance!
WSA
------------------
input Momentum_length = 6;
input Momentum_price = close;
Assert(Momentum_length > 0, "'length' must be positive: " + Momentum_length);
def Momentum = Momentum_price - Momentum_price[Momentum_length];
plot Momentum_ZeroLine = if IsNaN(close) then Double.NaN else 0;
Momentum_ZeroLine.SetPaintingStrategy(PaintingStra tegy.DASHES);
Momentum_ZeroLine.DefineColor("Positive and Up", Color.GREEN);
Momentum_ZeroLine.DefineColor("Negative and Down", Color.RED);
Momentum_ZeroLine.SetLineWeight(3);
Momentum_ZeroLine.HideTitle();
Momentum_Zeroline.HideBubble();
Momentum_ZeroLine.AssignValueColor(
if Momentum > 0 then Momentum_ZeroLine.Color("Positive and Up")
else if Momentum < 0 then Momentum_ZeroLine.Color("Negative and Down")
else GetColor(7));
-----------------------------
Comment