View Full Version : chart research value chart indicator
sgraham
01-05-2008, 10:00 PM
Is there a easy way that I can convert tradestation or an esignal indicator to be used with Ninja? I have the txt version as well for the indicator in tradestation. This copy was approved by Chart research.
{************************************************* ******************
Description : This Indicator plots Value Chart prices.
Provided By : Mark W. Helweg (c) Copyright 2001
************************************************** ******************}
Inputs:NumBars(5);
Variables:Vopen(0),VHigh(0),VLow(0),VClose(0),Var1 (0),Var2(0);
Var: VcloseLam(0),ValueSOB(" "),ValueMOB(" "),ValueMOS(" "), ValueSOS(" "), ValueFair(" "), lastdate(0);
{Calcualte Value Chart}
VOpen = VChart(NumBars,Open);
VHigh = VChart(NumBars,High);
VLow = VChart(NumBars,Low);
VClose = VChart(NumBars,Close);
{Plot Value Chart - Disregards the first 20 bars because Omega doesn't process them correctly}
If BarNumber > Numbars then Begin
Plot1(VOpen,"VOpen");
Plot2(VHigh,"VHigh");
Plot3(VLow,"VLow");
Plot4(VClose,"VClose");
End;
// Value Chart Lines
Inputs:Top(8),TopMid(4),BottomMid(-4),Bottom(-8);
Plot5(Top);
Plot6(TopMid);
Plot7(BottomMid);
Plot8(Bottom);
NinjaTrader_Josh
01-05-2008, 10:24 PM
Unfortunately there is no "easy" way. Someone will just have to sit down and do the conversion. If no one from the community takes you up you may want to try contacting one of our NinjaScript Consultants. Our list is here: http://www.ninjatrader.com/webnew/partners_onlinetrading_NinjaScript.htm
sbgtrading
01-07-2008, 04:21 PM
Does anyone know what the "VChart" function is here?
VOpen = VChart(NumBars,Open);
VHigh = VChart(NumBars,High);
VLow = VChart(NumBars,Low);
VClose = VChart(NumBars,Close);
NinjaTrader_Josh
01-07-2008, 11:18 PM
Vchart looks to be a custom function.
trader65
01-08-2008, 04:24 AM
here is the function,
{
Fixed divide by 0 problem - 11/11/2007 - Avery T. Horton, Jr. aka TheRumpledOne
************************************************** *****************
Description : This Function returns Value Chart prices.
Contact : David Stendahl: David@ChartResearch.com
************************************************** ******************}
Inputs:NumBars(Numeric),Price(NumericSeries);
Variables:VarNumBars(0),Var0(0),LRange(0),YDiv(0), RanVar4(0),VOpen(0),VHigh(0),VLow(0),VClose(0),
VarA(0),VarB(0),VarC(0),VarD(0),VarE(0),VarP(0),Va rR1(0),VarR2(0),VarR3(0),VarR4(0),VarR5(0);
{Insure NumBars is between 2 and 1000}
If NumBars < 2 then VarNumBars = 2;
If Numbars > 1000 then VarNumBars = 1000;
If Numbars >= 2 and NumBars <=1000 then VarNumBars = NumBars;
VarP=Round(VarNumBars/5,0);
If VarNumBars >7 then begin
VarA=Highest(H,VarP)-Lowest(L,VarP);
If VarA = 0 and VarP=1 then VarR1=absvalue(C-C[VarP]) Else VarR1 = VarA;
VarB=Highest(H,VarP)[VarP+1]-Lowest(L,VarP)[VarP];
If VarB = 0 and VarP=1 then VarR2=absvalue(C[VarP]-C[VarP*2]) Else VarR2 = VarB;
VarC=Highest(H,VarP)[VarP*2]-Lowest(L,VarP)[VarP*2];
If VarC = 0 and VarP=1 then VarR3=absvalue(C[VarP*2]-C[VarP*3]) Else VarR3 = VarC;
VarD=Highest(H,VarP)[VarP*3]-Lowest(L,VarP)[VarP*3];
If VarD = 0 and VarP=1 then VarR4=absvalue(C[VarP*3]-C[VarP*4]) Else VarR4 = VarD;
VarE=Highest(H,VarP)[VarP*4]-Lowest(L,VarP)[VarP*4];
If VarE = 0 and VarP=1 then VarR5=absvalue(C[VarP*4]-C[VarP*5]) Else VarR5 = VarE;
LRange=((VarR1+VarR2+VarR3+VarR4+VarR5)/5)*.2;
End;
If VarNumBars <=7 then Begin
If AbsValue(C-C[1]) > (H-L) then Var0=AbsValue(C-C[1]) else var0=(H-L);
If H=L then Var0=absvalue(C-C[1]);
LRange=Average(Var0,5)*.16;
End;
// Fixed divide by 0 problem - 11/11/2007 - Avery T. Horton, Jr. aka TheRumpledOne
If LRange <> 0
then begin
If Price = Open then
VChart=((Open-Average((H+L)/2,VarNumBars)))/(LRange);
If Price = High then
VChart=((High-Average((H+L)/2,VarNumBars)))/(LRange);
If Price = Low then
VChart=((Low-Average((H+L)/2,VarNumBars)))/(LRange);
If Price = Close then
VChart=((Close-Average((H+L)/2,VarNumBars)))/(LRange);
end;
Gumphrie
01-14-2008, 04:12 PM
I added value charts into my MTF indicator a while ago, If anyone wants a go PM me as its way too much of a manual configuration to post and please bear in mind that I'll probably have to 'train you up' in how to configure it, so my time will be taken up.
I quite like it, seems to suite my style of trading...
but its not for everyone.
dgregor5
01-15-2008, 01:52 AM
Following on from Gumphrie's note below, I can advise that his value chart (as part of his MTF indicator) is just fantastic ! I have been using it now for approx one month & provides excellent signals as part of a cohesive strategy.
This guy is a star !
thx Gumphrie
David
volguy
01-17-2008, 01:04 PM
does anyone know how to code this tradestation indicator into ninja trader, the tradestation easy language code is below. It is a Hi-Lo Activator indicator
[LegacyColorValue = true];
{ HiLo Activator
by Mark K sadhu@myacc.net }
Inputs: Len(20),Price(C);
Var: Swing(0);
Value1 = AverageFC(H,Len);
Value2 = AverageFC(L,Len);
if Price < Value2[1] then Swing = -1;
if Price > Value1[1] then Swing = 1;
if Swing = 1 then
Plot1(Value2,"+B");
Plot2(Value1,"-B");
if Swing = -1 then
Plot3(Value1,"+S");
Plot4(Value2,"-S");
Gumphrie
01-17-2008, 02:16 PM
Hi Volguy,
AverageFC is just an SMA as I understand so something like this OnBarUpdate():
double Value1=SMA(High,Len)[0];
double Value2=SMA(Low,Len)[0];
And then you just need two standard plots to do the other stuff.
volguy
01-17-2008, 03:09 PM
thanks, will I be able to use the same plots for this indicator that are in the tradestation easy langu age to put in ninja trader or will I have to write different code for ninja trader
Gumphrie
01-17-2008, 03:45 PM
thanks, will I be able to use the same plots for this indicator that are in the tradestation easy langu age to put in ninja trader or will I have to write different code for ninja trader
Umm.no, Different language. Just try out the indicator wizard and read the help.
maxwells
01-18-2008, 04:21 AM
I added value charts into my MTF indicator a while ago, If anyone wants a go PM me as its way too much of a manual configuration to post and please bear in mind that I'll probably have to 'train you up' in how to configure it, so my time will be taken up.
I quite like it, seems to suite my style of trading...
but its not for everyone.
Sup Gumphrie
I did send you a private message as you ask about this indicator...Dont forget too read them:)
Maxwells
sbgtrading
01-18-2008, 08:16 AM
Hello volguy,
Check out http://www.ninjatrader-support.com/vb/showthread.php?p=25583#post25583
I've coded your HiLoActivator based on using SMA's in place of the AverageFC function.
Ben
does anyone know how to code this tradestation indicator into ninja trader, the tradestation easy language code is below. It is a Hi-Lo Activator indicator
[LegacyColorValue = true];
{ HiLo Activator
by Mark K sadhu@myacc.net }
Inputs: Len(20),Price(C);
Var: Swing(0);
Value1 = AverageFC(H,Len);
Value2 = AverageFC(L,Len);
if Price < Value2[1] then Swing = -1;
if Price > Value1[1] then Swing = 1;
if Swing = 1 then
Plot1(Value2,"+B");
Plot2(Value1,"-B");
if Swing = -1 then
Plot3(Value1,"+S");
Plot4(Value2,"-S");
akwonline
02-07-2008, 08:30 PM
Hi I am also looking for the Value Chart indicator for the Ninja Trader....Did anyone ever code it, or where can I find it?
Thanks