Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 03-22-2011, 02:26 AM   #1

Join Date: Sep 2010
Posts: 3
Ignore this user

Thanks: 0
Thanked 2 Times in 1 Post

Jeff Augen's StdDev Price Change to NinjaTrader

Hi guys,

Can anyone help me out by porting the following code originally made to thinkorswim to NinjaTrader? Here it is:

declare lower;
input length = 20;
def closeLog = Log(close[1] / close[2]);
def SDev = stdev(closeLog, length)* Sqrt(length / (length – 1));
def m= SDev * close[1];
plot spike = (close[0] – close[1]) / m;
spike.setPaintingStrategy (PaintingStrategy.HISTOGR AM);
spike.AssignValueColor(if close > close[1] then Color.UPTICK else if close < close[1] then Color.DOWNTICK else GetColor(1));

Thanks a lot!
diogomattoso is offline  
Reply With Quote

Reply

Tags
indicator, ninjatrader, programming, standard deviation

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Price Change Drivers emini.ninja Technical Analysis 5 02-17-2011 11:35 AM
Change Thyself zdo Trading Psychology 22 01-13-2011 03:54 PM
Change Username NoSquigglyLines Support Center 2 02-28-2009 08:26 AM
Stddev Vs Vwap spyro Coding Forum 4 11-04-2008 09:24 AM
Change of instrument feb2865 Forex Trading Laboratory 2 11-12-2006 09:54 PM

All times are GMT -4. The time now is 03:26 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.