TRO Indicators for NinjaTrader

free & uncensored discussion arena for TheRumpledOne

Moderator: moderators

User avatar
Gert Frobe
rank: 150+ posts
rank: 150+ posts
Posts: 177
Joined: Fri Jun 30, 2006 9:51 pm
Reputation: 0
Location: Arlington, Texas
Real name: ben arata
Gender: Male

Postby Gert Frobe » Fri Aug 10, 2007 3:43 pm

cvax, your welcom. i got them from billbree a fellow pirate.

again thank you both.

BTW, can you convert esignal code?

airball

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

cvax
rank: 50+ posts
rank: 50+ posts
Posts: 83
Joined: Sun May 13, 2007 12:45 am
Reputation: 0
Gender: None specified

Postby cvax » Fri Aug 10, 2007 6:00 pm

I actually prefer converting esignal code simply because I can view the source with syntax highlighting within their program. With esignal code I also have access to their help library to figure out what various functions do. For TradeStation code I pretty much just guess and hope its correct.

User avatar
Gert Frobe
rank: 150+ posts
rank: 150+ posts
Posts: 177
Joined: Fri Jun 30, 2006 9:51 pm
Reputation: 0
Location: Arlington, Texas
Real name: ben arata
Gender: Male

Postby Gert Frobe » Fri Aug 10, 2007 7:34 pm

here are 2 esignal indicators that are very helpful:

http://kreslik.com/forums/portal.php?topic_id=570

i see that you converted the controle and thank you for that. this one loades lots faster and the candle color is a great tool.

airball

cvax
rank: 50+ posts
rank: 50+ posts
Posts: 83
Joined: Sun May 13, 2007 12:45 am
Reputation: 0
Gender: None specified

Postby cvax » Sat Aug 11, 2007 9:47 am

TRO_Dynamic_FibsSR2L and TRO_Dynamic_FibsSR2U

Attachments
TRO_Dynamic_FibsSR2LU_v1.00.zip
(7.39 KiB) Downloaded 389 times
Last edited by cvax on Sat Aug 11, 2007 6:33 pm, edited 1 time in total.

User avatar
Gert Frobe
rank: 150+ posts
rank: 150+ posts
Posts: 177
Joined: Fri Jun 30, 2006 9:51 pm
Reputation: 0
Location: Arlington, Texas
Real name: ben arata
Gender: Male

Postby Gert Frobe » Sat Aug 11, 2007 4:21 pm

cvax, this is great! and thank you very much. if you need any other code im happy to help and let me knoe if you need help w/ any of your buy zone settings.

airball

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

cvax
rank: 50+ posts
rank: 50+ posts
Posts: 83
Joined: Sun May 13, 2007 12:45 am
Reputation: 0
Gender: None specified

Postby cvax » Mon Aug 13, 2007 5:54 pm

TRO_SM_CandleColor2


Hope this one works to your likings airball. You can choose how many historical PMSM dots it will draw.

Edit: After doing this indicator I figured out how to allow the indicator to update to what is displayed on the chart as opposed to what is the latest incoming data. This way you can scroll backwards in time and have the indicator update its value. With this new knowledge I went back and redid TRO_SM_Trend and TRO_SM_Compass. Get the new version on the first page. I will also begin to start attaching Motherlodes to the very first post to make it easy to get the latest versions of everything.
Attachments
TRO_SM_CandleColor2_v1.00.zip
(3.34 KiB) Downloaded 361 times

cvax
rank: 50+ posts
rank: 50+ posts
Posts: 83
Joined: Sun May 13, 2007 12:45 am
Reputation: 0
Gender: None specified

Postby cvax » Thu Aug 23, 2007 7:27 pm

TRO_SM_Control_PMSM6

Image
Attachments
TRO_SM_Control_PMSM6.zip
(3.97 KiB) Downloaded 362 times

User avatar
Gert Frobe
rank: 150+ posts
rank: 150+ posts
Posts: 177
Joined: Fri Jun 30, 2006 9:51 pm
Reputation: 0
Location: Arlington, Texas
Real name: ben arata
Gender: Male

Postby Gert Frobe » Thu Aug 23, 2007 11:03 pm

cvax, i have a dumb question. how do i download these into ninjatrader? iv never used their charting just the superDOM.

thanks

airball

cvax
rank: 50+ posts
rank: 50+ posts
Posts: 83
Joined: Sun May 13, 2007 12:45 am
Reputation: 0
Gender: None specified

Postby cvax » Thu Aug 23, 2007 11:15 pm

To install the .zip files:
1. From the Control Center window select the menu File > Utilities > Import NinjaScript to open the Import NinjaScript dialog window
2. Select the file you want to import
3. Press the "Open" button

To install the .cs files:
1. Download file into \My Documents\NinjaTrader 6\bin\Custom\Indicator
2. Control Center->Tools->Edit Indicator->select the .cs file you just placed into the Indicator folder
3. F5 to compile indicator and then you are ready to use the indicators

To use the indicators in NinjaTrader:
1. Control Center->File->New->Chart
2. Ctrl+I to bring up Indicators
3. Select from drop down menu
4. Press New
5. Adjust parameters to likings
6. Hit Apply then OK

User avatar
Gert Frobe
rank: 150+ posts
rank: 150+ posts
Posts: 177
Joined: Fri Jun 30, 2006 9:51 pm
Reputation: 0
Location: Arlington, Texas
Real name: ben arata
Gender: Male

Postby Gert Frobe » Sat Aug 25, 2007 11:21 pm

cvax thanks i got them working. this is TRO_TRADE_ZONES_TIME it is just like the zone but you can set the start time of the zones at any time you want ie @ 7am for the NY open or 2am for the london or at 30 min before a news event ect...

again thank you for all your help.

airball

ps sorry guys for the long post for the code.

/*************************************

TRO_TRADE_ZONES_TIME 12:34 PM 4/16/2007 PLOTS TRADE ZONE LINES based on Session Time Input

Programmer: Avery T. Horton, Jr. aka TheRumpledOne,

DONATIONS AND GIFTS ACCEPTED

P O BOX 43575, TUCSON, AZ 85733

please include this and/or any other comment blocks and a
description of any changes you make.

Copyright 2007, All Rights Reserved. Code may be modified for
personal use only. No portion of this code can be sold or
otherwise redistributed without the express written consent of
the author, Avery T. Horton, Jr.


ATTN ESIGNAL: I DID NOT POST THIS CODE ON YOUR FORUM
I AM NOT RESPONSIBLE FOR ANY ESIGNAL FORUM RULE VIOLATIONS.

****/




function preMain() {

setPriceStudy(true);
setStudyTitle("TRO_TRADE_ZONES_TIME");
setShowTitleParameters( false );

setCursorLabelName("Long Top ", 0);
setCursorLabelName("Long Bot ", 1);
setCursorLabelName("Open ", 2);
setCursorLabelName("Short Top", 3);
setCursorLabelName("Short Bot", 4);
setCursorLabelName("PrevClose", 5);

setDefaultBarFgColor(Color.blue,0);
setDefaultBarFgColor(Color.blue,1);
setDefaultBarFgColor(Color.lime,2);
setDefaultBarFgColor(Color.red,3);
setDefaultBarFgColor(Color.red,4);
setDefaultBarFgColor(Color.magenta,5);

setDefaultBarThickness(2,0);
setDefaultBarThickness(2,1);
setDefaultBarThickness(2,2);
setDefaultBarThickness(2,3);
setDefaultBarThickness(2,4);
setDefaultBarThickness(2,5);

setPlotType(PLOTTYPE_FLATLINES,0);
setPlotType(PLOTTYPE_FLATLINES,1);
setPlotType(PLOTTYPE_FLATLINES,2);
setPlotType(PLOTTYPE_FLATLINES,3);
setPlotType(PLOTTYPE_FLATLINES,4);
setPlotType(PLOTTYPE_FLATLINES,5);

// checkVersion(1,"http://share.esignal.com/ContentRoot/ACM%20Test/Formulas/PrevDay-OHLC.efs");


debugClear();

var aFPArray = new Array();
var x;
x=0;
aFPArray[x] = new FunctionParameter( "iTime", FunctionParameter.STRING);
with( aFPArray[x] ) {
setName( "Session Start Time" );
setDefault( "14:00" );
}

}

var vOpen = null;
var vOpen1 = null;
var vHigh = null;
var vHigh1 = null;
var vLow = null;
var vLow1 = null;
var vClose1 = null;

var vMid = null;
var vMid1 = null;

var bInit = false;
var nSession = null;
var sGotOpen = false;
var xSession = 0;
var sSession = false;

askForInput();




var iDecimals = new FunctionParameter("iDecimals", FunctionParameter.NUMBER);
iDecimals.setDefault( 4 );

var iAlert = new FunctionParameter("iAlert", FunctionParameter.BOOLEAN);
iAlert.setDefault( true );

var iOffset1 = new FunctionParameter("iOffset1", FunctionParameter.NUMBER);
iOffset1.setDefault( .0003 );

var iOffset2 = new FunctionParameter("iOffset2", FunctionParameter.NUMBER);
iOffset2.setDefault( .0004 );

var iColorLong = new FunctionParameter("iColorLong", FunctionParameter.COLOR);
iColorLong.setDefault( Color.RGB(215,255,195));

var iColorShort = new FunctionParameter("iColorShort", FunctionParameter.COLOR);
iColorShort.setDefault( Color.RGB(254,233,233));

var iColorWait = new FunctionParameter("iColorWait", FunctionParameter.COLOR);
iColorWait.setDefault( Color.paleyellow);

var iButtonX = new FunctionParameter("iButtonX", FunctionParameter.NUMBER);
iButtonX.setDefault( 250 );

var iButtonY = new FunctionParameter("iButtonY", FunctionParameter.NUMBER);
iButtonY.setDefault( 15 );

function main( iDecimals, iAlert , iTime, iOffset1 ,iOffset2 ,iColorLong , iColorShort, iColorWait, iButtonX , iButtonY ) {

// if (close(-1)==null)
// return;


// initialize upon first loading formula

if(getBarState() == BARSTATE_ALLBARS) {
drawTextPixel( iButtonX, iButtonY , "TRO TradeZone Time @URL=EFS:editParameters", Color.white, Color.green,
Text.RELATIVETOLEFT|Text.RELATIVETOBOTTOM|Text.ONTOP|Text.BOLD|Text.BUTTON,
"Comic Sans MS", 13, "UpExp");
vDate = new Date();
vInterval = getInterval();
vSymbol = getSymbol().toUpperCase();

// for RTH, eg, to convert, ES Z2 to ES Z2=2
var rootSymbol = vSymbol.substring(0,3);
if (rootSymbol == "ES " || rootSymbol == "NQ ")
if ( vSymbol.indexOf("=2") == -1 ) vSymbol += "=2";

vSymbol += ",D";
// return null;
}




if ( bInit == false ) {

nSession = TimeToMinutes( iTime );

bInit = true;
}

nTime = getBarTime(0);

/*
debugPrint("iTime: " + iTime + "\n" );

debugPrint("nSession: " + nSession + "\n" );

debugPrint("nTime: " + nTime + "\n" );
*/

if(getBarState()==BARSTATE_NEWBAR && nTime<=nSession && sSession == false ) {
sSession = true ;
}

if(getBarState()==BARSTATE_NEWBAR && nTime>=nSession && sSession == true ) {
sSession = false ;
vHigh1 = vHigh;
vLow1 = vLow ;
vOpen1 = vOpen ;
vClose1 = rnd( close(-1) , iDecimals) ;//comment out this line if using alternate vClose1
vMid1 = rnd( vMid , iDecimals) ;
vHigh = high() ;
vLow = low() ;
vOpen = open() ;

}


vLongTop = rnd(vOpen + iOffset2, iDecimals) ;
vLongBot = rnd(vOpen + iOffset1, iDecimals) ;

vShortTop = rnd(vOpen - iOffset1, iDecimals) ;
vShortBot = rnd(vOpen - iOffset2, iDecimals) ;

vClose1 = rnd(vClose1, iDecimals) ;
vOpen = rnd(vOpen, iDecimals) ;

if (vOpen1 == null || vLow1 == null || vHigh1 == null || vClose1 == null) {
return;
} else {



// PREVIOUS Close ALERT

if( ( high(-1) < vClose1 || low(0) < vClose1 ) && close(0) >= vClose1 ){
if( iAlert == true ) { Alert.addToList(getSymbol(), vClose1 +" Cross above PrevClose", Color.green, Color.black);
Alert.playSound("ding.wav");

debugPrint("Cross above PrevClose: " + rnd( vClose1, iDecimals) + " " + getValue( "Time" ) + "\n" );
}
}

if( ( low(-1) > vClose1 || high(0) > vClose1 ) && close(0) <= vClose1 ){
if( iAlert == true ) { Alert.addToList(getSymbol(), vClose1 +" Cross below PrevClose", Color.red, Color.black);
Alert.playSound("ding.wav");

debugPrint("Cross below PrevClose: " + rnd( vClose1, iDecimals) + " " + getValue( "Time" ) + "\n" );
}
}


// Open ALERT

if( ( high(-1) < vOpen || low(0) < vOpen ) && close(0) >= vOpen ){
if( iAlert == true ) { Alert.addToList(getSymbol(), vOpen +" Cross above Open", Color.green, Color.black);
Alert.playSound("ding.wav");

debugPrint("Cross above Open: " + rnd( vOpen , iDecimals) + " " + getValue( "Time" ) + "\n" );
}
}

if( ( low(-1) > vOpen || high(0) > vOpen ) && close(0) <= vOpen ){
if( iAlert == true ) {
Alert.addToList(getSymbol(), vOpen +" Cross below Open", Color.red, Color.black);
Alert.playSound("ding.wav");

debugPrint("Cross below Open: " + rnd( vOpen , iDecimals) + " " + getValue( "Time" ) + "\n" );
}
}

// LONG ZONE ALERT



if( close(0) >= vLongBot && close(0) <= vLongTop ){
if( iAlert == true ) { Alert.addToList(getSymbol(), rnd( close(0) , iDecimals) +" Price in Long Zone", Color.green, Color.black);
Alert.playSound("ding.wav");

debugPrint("Price in Long Zone: " + rnd( close(0) , iDecimals) + " " + getValue( "Time" ) + "\n" );

}
}

// SHORT ZONE ALERT

if( close(0) >= vShortBot && close(0) <= vShortTop ){
if( iAlert == true ) { Alert.addToList(getSymbol(), rnd( close(0) , iDecimals) +" Price in Short Zone", Color.green, Color.black);
Alert.playSound("ding.wav");

debugPrint("Price in Short Zone: " + rnd( close(0) , iDecimals) + " " + getValue( "Time" ) + "\n" );
}
}


setBarBgColor(iColorLong ,0, vLongBot, vLongTop );

setBarBgColor(iColorShort, 1, vShortBot, vShortTop );

setBarBgColor(iColorWait, 2, vShortTop , vLongBot );

return new Array( vLongTop,vLongBot,rnd(vOpen, iDecimals),vShortTop,vShortBot,rnd(vClose1,iDecimals) ) ;
}
}



function editParameters() {
askForInput("TRO_TRADE_ZONES_TIME");
return;
}

// rnd function - round to two places
function rnd(value, iDecimals ) { // Round the price to iDecimals digits

value = value * Math.pow(10, iDecimals);

return Math.round(value, iDecimals) / Math.pow(10, iDecimals);
}


//== Converts string time representation to minutes

function TimeToMinutes( sStr ) {
var i;
var nTmp;

if ( sStr == "0" ) return( -1 );

i = sStr.split( ":" );
nTmp = 0 + (i[0] * 60) + (i[1]*1);
return ( nTmp );
}

//get the current bar time (as total minutes)

function getBarTime( nOffset ) {
var nTmp = 0;
nTmp = (getHour(-nOffset)*60) + getMinute(-nOffset);
return( nTmp );
}

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.


Return to “TheRumpledOne”