Help modding esignal efs code - eSignal | futures io social day trading
futures io futures trading


Help modding esignal efs code
Updated: Views / Replies:1,721 / 3
Created: by manictrader Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Help modding esignal efs code

  #1 (permalink)
Trading Apprentice
london
 
Futures Experience: Intermediate
Platform: esignal
Favorite Futures: URRUSD
 
Posts: 3 since Jun 2014
Thanks: 0 given, 0 received

Help modding esignal efs code

Hi

I have been using this indicator for a few months and i like it but do you know any way to mod the code so it will highlight a bar yellow if it hits +8 or -8?

Thanks

 
Code
/********************************************************************
Title:		Value Chart Indicator Script for eSignal 7.x
By:         Chris D. Kryza (Divergence Software, Inc.)
Email:      c.kryza@gte.net
Incept:     09/26/2003
Version:    1.0.0


=====================================================================
Fix History:

09/26/2003 -   Initial Release
1.0.0

=====================================================================
Project Description:   

David Stenhahl's Value Chart Indicator. From the book "Dynamic
Trading Indicators" by Mark Helweg and David Stendahl.

If you come across any fixes or have any ideas on how to spruce it up, I
would appreciate it if you would let me know (c.kryza@gte.net).

Dislaimer: For educational purposes only! Obviously, no guarantees 
whatsoever and use at your own risk.

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


//Global Variables
var grID                = 0;
var nBarCounter			= 0;
var aFPArray			= new Array();
var aArray				= new Array();
var nVarP				= null;
var bInitialized		= false;
var nTotalBars			= null;
var nMaxBars			= 200;

var nStudyMin			= -12;
var nStudyMax			=  12;


//== PreMain function required by eSignal to set things up
function preMain() {
var x;

    setPriceStudy(false);
    setStudyTitle("Value Chart");
    
    addBand(  8, PS_SOLID, 1, Color.red,  -10 );
    addBand(  4, PS_SOLID, 1, Color.teal, -11 );
    addBand( -4, PS_SOLID, 1, Color.teal, -12 );
    addBand( -8, PS_SOLID, 1, Color.red,  -13 );            

	//unrem this if you don't want the labels in cursor window
    setShowCursorLabel(false);
    
    setStudyMin( nStudyMin );
    setStudyMax( nStudyMax );
    
    setComputeOnClose();
    grID = 0;
    
    //initialize formula parameters
	x=0; 
	aFPArray[x] = new FunctionParameter( "NumBars", FunctionParameter.NUMBER);
	with( aFPArray[x] ) {
		setName( "Input: Bars" );
		setLowerLimit( 2 );
		setUpperLimit( 1000 );
		setDefault( 5 );
	}  
	x++;
	aFPArray[x] = new FunctionParameter( "MaxToDraw", FunctionParameter.NUMBER);
	with( aFPArray[x] ) {
		setName( "Max Bars to Draw" );
		setLowerLimit( 20 );
		setUpperLimit( 5000 );
		setDefault( 100 );
	}  

	for ( x=0; x<50; x++ ) {
		aArray[x] = 0.0;
	}

}

//== Main processing function
function main( NumBars, MaxToDraw ) {
var x;
var nVarA;
var nVarB;
var nVarC;
var nVarD;
var nVarE;
var nVarR1;
var nVarR2;
var nVarR3;
var nVarR4;
var nVarR5;
var nVarR0;
var nOpen, nHigh, nLow, nClose;
	
	//script is initializing
    if ( getBarState() == BARSTATE_ALLBARS ) {
        return null;
    }

	if ( bInitialized == false ) {
		nVarP = Math.round( NumBars/5 );
		nMaxBars = MaxToDraw*3;
		nMaxBars += (nMaxBars % 3)-1;
		nTotalBars = getNumBars();
		bInitialized = true;
	}

	//called on each new bar
	if ( getBarState() == BARSTATE_NEWBAR ) {
	
		aArray.pop();
		aArray.unshift(0);
	
		nBarCounter++;
		
	}

	if ( nBarCounter < (nTotalBars-(nMaxBars/3))-10 ) return;


	if ( NumBars > 7 ) {
		nVarA = Highest( nVarP, 0 ) - Lowest( nVarP, 0 );
		if ( nVarA == 0 && nVarP ==1 ) 
			nVarR1 = Math.abs( close()-close(-nVarP) );
		else
			nVarR1 = nVarA;
			
		nVarB = Highest( nVarP, nVarP+1 ) - Lowest( nVarP, nVarP );
		if ( nVarB == 0 && nVarP==1 )
			nVarR2 = Math.abs( close(-nVarP)-close(-(nVarP*2)));
		else
			nVarR2 = nVarB;
			
		nVarC = Highest( nVarP, nVarP*2 ) - Lowest( nVarP, nVarP*2 );
		if ( nVarC == 0 && nVarP==1 )
			nVarR3 = Math.abs( close(-(nVarP*2))-close(-(nVarP*3)));
		else
			nVarR3 = nVarC;

		nVarD = Highest( nVarP, nVarP*3 ) - Lowest( nVarP, nVarP*3 );
		if ( nVarD == 0 && nVarP==1 )
			nVarR4 = Math.abs( close(-(nVarP*3))-close(-(nVarP*4)));
		else
			nVarR4 = nVarD;
		
		nVarE = Highest( nVarP, nVarP*4 ) - Lowest( nVarP, nVarP*4 );
		if ( nVarE == 0 && nVarP==1 )
			nVarR5 = Math.abs( close(-(nVarP*4))-close(-(nVarP*5)));
		else
			nVarR5 = nVarE;
		
		nLRange = ( ( nVarR1 + nVarR2 + nVarR3 + nVarR4 + nVarR5 ) / 5 ) * 0.20;
	}
	else {
		if ( Math.abs( close()-close(-1) ) > (high()-low())) 
			nVar0 = Math.abs( close()-close(-1) );
		else
			nVar0 = high()-low();
			
		if ( high()==low() )
			nVar0 = Math.abs( close()-close(-1) );
			
		aArray[0] = nVar0;
			
		nLRange = Average( aArray, 5 ) * 0.20;
	}
		
		
	if ( nLRange <= 0 ) return;
	
	nOpen  = (  open() - HLAverage( NumBars ) ) / nLRange;
	nHigh  = (  high() - HLAverage( NumBars ) ) / nLRange;
	nLow   = (   low() - HLAverage( NumBars ) ) / nLRange;
	nClose = ( close() - HLAverage( NumBars ) ) / nLRange;	
	
	//adjust study window height, as necessary
	if ( nBarCounter > (nTotalBars-(nMaxBars/3))) {
		if ( nHigh > nStudyMax ) {
			nStudyMax = nHigh;
			setStudyMax( nStudyMax );
		}
		if ( nLow < nStudyMin ) {
			nStudyMin = nLow;
			setStudyMin( nStudyMin );
		}
	}		
		
	//draw the OHLC bar in the study window		
	drawBar( nOpen, nHigh, nLow, nClose );


}


/*************************************************
             SUPPORT FUNCTIONS                    
**************************************************/   

function drawBar( nO, nH, nL, nC ) {

	drawLineRelative( 0, nL, 0, nH, PS_SOLID, 3, Color.navy, gID() );
	drawLineRelative( 0, nO, 0, nO, PS_SOLID, 5, Color.lime, gID() );
	drawLineRelative( 0, nC, 0, nC, PS_SOLID, 5, Color.red, gID() );	
	
}
	

function HLAverage( nBars ) {
var x = 0;
var nTmp = 0;

	while ( x<nBars ) {
		nTmp += ( high(-x) + low(-x) ) / 2;
		x++;
	}
	
	return( nTmp/nBars );
	
}    
 
    
function Average( Arr, nBars ) {
var x = 0;
var nTmp = 0;

	while ( x<nBars ) {
		nTmp += Arr[x];
		x++;
	}
	
	return( nTmp/nBars );
	
}    
    
function Highest( nBars, nOffset ) {
var x = nOffset;
var nTmp = -9999999999.0;

	while ( x<nBars+nOffset ) {
		nTmp = Math.max( nTmp, high(-(x)) );
		x++;
	}
	
	return( nTmp );
	
}    

function Lowest( nBars, nOffset ) {
var x = nOffset;
var nTmp = 9999999999.0;

	while ( x<nBars+nOffset ) {
		nTmp = Math.min( nTmp, low(-(x)) );
		x++;
	}
	
	return( nTmp );
	
}    

    
//== gID function assigns unique identifier to graphic/text routines
function gID() {
    grID ++;
    if ( grID>nMaxBars ) grID = 0;
    return( grID );
}

Reply With Quote
 
  #2 (permalink)
Trading Apprentice
london
 
Futures Experience: Intermediate
Platform: esignal
Favorite Futures: URRUSD
 
Posts: 3 since Jun 2014
Thanks: 0 given, 0 received

I have tried many things but still no luck

Basically I want to change the colour of this

drawLineRelative( 0, nO, 0, nO, PS_SOLID, 5, Color.lime, gID() );

to red if it crosses the -8 line

Reply With Quote
 
  #3 (permalink)
Elite Member
Rheinland-Pfalz,Germany
 
Futures Experience: Intermediate
Platform: eSignal
Broker/Data: IB, eSignal
Favorite Futures: ES,EUR/USD,forex
 
loschle's Avatar
 
Posts: 5 since Nov 2010
Thanks: 15 given, 1 received


I am not sure if I understand what you need.
But if you want the study to look like this:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

then look to attached x.efs
You can identify the changes in the "drawBar" function.
Hope it help a bit.

Attached Files
Register to download File Type: efs x.efs (6.4 KB, 12 views)
Reply With Quote
 
  #4 (permalink)
Trading Apprentice
london
 
Futures Experience: Intermediate
Platform: esignal
Favorite Futures: URRUSD
 
Posts: 3 since Jun 2014
Thanks: 0 given, 0 received

Hi Thanks, that worked perfectly.

Really appreciate the help there!!

Reply With Quote

Reply



futures io > > > > Help modding esignal efs code

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
.efs text file to working NT code tradermark2009 Hire a Consultant or Programmer 0 May 7th, 2013 04:56 PM
modding anaIBRangeBands to plot IB values for all sessions qewcool NinjaTrader Programming 1 November 16th, 2012 03:23 AM
Sending a keyboard command from an efs study ECI Ed eSignal 0 January 10th, 2012 10:13 AM
eSignal and R rlangdon Matlab, R project and Python 5 August 14th, 2011 06:54 PM
eSignal open code indicators wanted and to offer emazing eSignal 3 August 10th, 2011 09:27 AM


All times are GMT -4. The time now is 10:50 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-11 in 0.10 seconds with 20 queries on phoenix via your IP 54.145.16.43