eSignal - TREND INDICATOR

eSignal indicators

Moderator: moderators

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 11440
Joined: Sun May 14, 2006 9:31 pm
Reputation: 45
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

eSIGNAL - HIGHER HIGH/LOWER LOW SLOT MACHINE INDICATOR

Postby TheRumpledOne » Sun Jul 30, 2006 1:05 am

eSIGNAL - HIGHER HIGH/LOWER LOW SLOT MACHINE INDICATOR



Code: Select all

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

TRO_SM_HHLL 20060728 HIGHER HIGH/LOWER LOW SLOT MACHINE INDICATOR

Programmer:  Avery T. Horton, Jr.  aka TheRumpledOne



Provided By : eSignal (c) Copyright 2004
Description:  Pixel Spacing Example

drawTextPixel(xBar, yValue, Text, [FGColor], [BGColor], [Flags],
        [FontName], [FontSize], [TagName], [cx], [cy])

This function is used to draw text on the chart at precise pixel
locations. It is used in conjunction with the getTextHeight() and
getTextWidth() functions.

xBar:  Relative position where text should appear.
yValue:  y-axis value where text should appear
Text:  The text that should be displayed
FGColor:  Optional. If not provided, pass null. Foreground color of the text.
BGColor:  Optional. if not provided, pass null. Background color of the text
Flags:  Text Flags (these can be ORd together). Pass null if not using flags.
FontName:  Optional. If not provided, pass null. Otherwise, pass a font name (e.g, "Courier" or "Arial").
FontSize:  Optional. If not provided, pass null. Otherwise, pass the font size to use (e.g., 11 or 15 or 8, etc.)
TagName:  A unique identifier for this text object.
cx:   Optional. Pixel spacing control.
cy:   Optional. Pixel spacing control.


Notes:

The cx and cy parameters control the
width (cx) and height (cy) of the text label.  They are also
available in the drawTextRelative and drawTextAbsolute functions,
but are not very useful unless you are using them in combination
with text flags, RELATIVETOTOP, RELATIVETOLEFT and RELATIVETOBOTTOM. 
Both cx and cy require whole numbers.

You can pass positive or negative numbers to these parameters.
If you use positive whole numbers then the size is based on that
number of pixels.
    cx of 15 will be the width of the text label of 15 pixels.
    cy of 15 will be the height of the text label of 15 pixels.
If you use negative whole numbers then the size is relative to the
specified font size.
    cx of -15 will be the approxomate width of 15 characters of the
        specified font.
    cy of -2 will be 2 times the height of the specified
        font.  -3 would be 3 times the height etc.


The formula example below draws a table containing
3 columns and 2 rows of text labels.


Verwendete Indikatoren:


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

var nFontCY = 0;
var nFontCX = 0;
var nColWidth   = 0;
var nRowThickness = 1;
var nFontSize   = 10;
var sStr;
var tStr;
var diff1 =0;
var diff2 =0;
var midpoint1 =0;
var realtimepivot =0;

var xInit   = false;
var xMiddle = null;
var xGap    = null;
var xHiOp   = null;
var xOpLo   = null;

var xOpen   = null;
var xHigh   = null;
var xLow    = null;
var xClose  = null;

var kHH = null;
var kLH = null;
var kHL = null;
var kLL = null;
var zSymbol = null;

function preMain() {
    setStudyTitle("TRO_SM_HHLL");
    setShowCursorLabel(false);
    setShowTitleParameters(false);
   


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

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


    var iFontSize = new FunctionParameter("iFontSize", FunctionParameter.NUMBER);
   iFontSize.setDefault( 10 );
 

    var iDecimals = new FunctionParameter("iDecimals", FunctionParameter.NUMBER);
   iDecimals.setDefault( 2 );
        iDecimals.setName("Round to X decimals");

    /***** Column Width is used here for the cx parameter *****/
   var fp = new FunctionParameter("inputColWidth", FunctionParameter.NUMBER);
   fp.setName("Column Width");
   fp.setDefault(80);

    /***** Row Thickness is used here for the cy parameter *****/
   var fp = new FunctionParameter("inputRowThickness", FunctionParameter.NUMBER);
   fp.setName("Row Thickness");
   fp.setDefault(-1.2);

   var fp = new FunctionParameter("inputFontSize", FunctionParameter.NUMBER);
   fp.setName("Font Size");
   fp.setLowerLimit(1);
   fp.setDefault(11);

    /*****
        With drawTextPixel, X Start = the number of pixels from the left of
            the window.
        With drawTextRelative or Absolute, X Start will be the bar index unless
            the RELATIVETO### text flags are used.  In which case the values
            will represent pixels.
    *****/
   var fp = new FunctionParameter("inputXstart", FunctionParameter.NUMBER);
   fp.setName("X Start");
   fp.setLowerLimit(1);
   fp.setDefault(5);

    /*****
        With drawTextPixel, Y Start = the number of pixels from the top of
            the window.
        With drawTextRelative or Absolute, Y Start will be relative to the
            price scale of the chart symbol unless the RELATIVETO### text
            flags are used.  In which case the values will represent pixels.
    *****/
   var fp = new FunctionParameter("inputYstart", FunctionParameter.NUMBER);
   fp.setName("Y Start");
   fp.setLowerLimit(1);
   fp.setDefault(20);   
   
       
    var fp4 = new FunctionParameter("roundlen", FunctionParameter.NUMBER);
        fp4.setName("roundlen");
        fp4.setLowerLimit(0);
        fp4.setDefault(2);
}

var bEdit = true;


function main( 
           
            inputColWidth, inputRowThickness, inputFontSize,
            inputXstart, inputYstart,
             
            iDecimals, 


        iFontSize, iButtonX, iButtonY) {
           
           
   
  // initialize upon first loading formula
    if(getBarState() == BARSTATE_ALLBARS) {
        drawTextPixel( iButtonX , iButtonY, " TRO_SM_HHLL @URL=EFS:editParameters", Color.white,    Color.lime,
            Text.RELATIVETOLEFT|Text.RELATIVETOBOTTOM|Text.ONTOP|Text.BOLD|Text.BUTTON,
            "Comic Sans MS", 13, "UpExp");
        vDate = new Date();
        iInterval = getInterval();

        vSymbol = getSymbol().toUpperCase();
   
        xSymbol = 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;
    }
         
   
   
   
   
    //  prevents the formula from executing except at bar 0 and on new bar.
   if(getCurrentBarIndex() != 0 && getBarState() != BARSTATE_NEWBAR) return;

    // initialization routine to set values for global variables
    if (bEdit == true) {
        nColWidth = Math.round(inputColWidth);
        nRowThickness = Math.round(inputRowThickness);
        nFontSize = Math.round(inputFontSize);
       
        /***** Used for setting the space between x/y anchors for text
            labels based on the font height *****/
        if (nRowThickness < 0) {
            nFontCY = getTextHeight("A", null, nFontSize)*(nRowThickness);
        } else {
            nFontCY = -nRowThickness;
        }
       
        /***** This will get the maximum width for the specified string
            based on the specified font type.  If the font type is not
            specified it uses a default Arial. *****/
        if (nColWidth < 0) {
            nFontCX = getTextWidth("Row ## Col ##", null, nFontSize);
        } else {
            nFontCX = nColWidth;
        }
        bEdit = false;
    }

    var nX = inputXstart;
    var nY = inputYstart;

   
   
    //DISPLAY  COLUMN HEADINGS
   
        tStr= "Symbol"   ;
    drawTextPixel(nX, nY, tStr, Color.blue, Color.lightgrey,
        Text.FRAME | Text.CENTER | Text.VCENTER | Text.BOLD,
        null, nFontSize, "r4c0", nColWidth, nRowThickness);

        tStr= "Highs"   ;
    drawTextPixel(nX+=nFontCX, nY, tStr, Color.blue, Color.lightgrey,
        Text.FRAME | Text.CENTER | Text.VCENTER | Text.BOLD,
        null, nFontSize, "r4c1", nColWidth, nRowThickness);

        tStr= "Lows"  ;
    drawTextPixel(nX+=nFontCX, nY, tStr, Color.blue, Color.lightgrey,
        Text.FRAME | Text.CENTER | Text.VCENTER | Text.BOLD,
        null, nFontSize, "r4c2", nColWidth, nRowThickness);

       
   
    //Zeile2
   
    nX = inputXstart;
    nY -= nFontCY;

    if(xInit==false){

// INITIALIZE ROW 1
      

         xOpen   =  open( ) ;
         
         xHigh   =  high( ) ;

         xLow    =  low( ) ;

         xClose  =  close( ) ;

         xInit=true;

    } // xInit
     

 
 
           sStr     = xSymbol ;
        drawTextPixel(nX, nY, sStr, Color.white, Color.black,
        Text.FRAME | Text.CENTER | Text.VCENTER | Text.BOLD,
        null, nFontSize, "r3c0", nColWidth, nRowThickness);
       

if (getBarState() == BARSTATE_NEWBAR) {

// PROCESS ROW 1 COLUMN 1 

if( xSymbol != zSymbol) {

 kHH = 0 ;
 kLH = 0 ;
 kHL = 0 ;
 kLL = 0 ;
}


var zOpen    = xOpen.getValue(0) ;

var zClose   = xClose.getValue(0) ;
 
var zClose1  = xClose.getValue(-1) ;

var zHigh    = xHigh.getValue(0) ;

var zHigh1   = xHigh.getValue(-1) ;

var zLow     = xLow.getValue(0) ;

var zLow1    = xLow.getValue(-1) ;

var zMid1   = rnd( ((zHigh1 + zLow1) * .50) , 2 )   ;

var zGap    = rnd( (zOpen - zClose1) , 2) ;
 
zSymbol = xSymbol ;

        if( zHigh  > zHigh1 ) {

           kHH = kHH + 1;
           kLH = -1;
           xFGColor = Color.black;
          xBGColor = Color.lime;
               sStr = "HH " + kHH ;
             ;        } 
        else
        if( zHigh  < zHigh1 ) {
           kHH = -1;
           kLH = kLH + 1;
           xFGColor = Color.black;
          xBGColor = Color.red;
               sStr = "LH " + kLH;
               }
       else {   
           xFGColor = Color.black;
          xBGColor = Color.yellow;
           sStr = "=H"
           }

        drawTextPixel(nX+=nFontCX, nY, sStr, xFGColor, xBGColor,
        Text.FRAME | Text.CENTER | Text.VCENTER | Text.BOLD,
        null, nFontSize, "r3c1", nColWidth, nRowThickness);


// PROCESS ROW 1 COLUMN 2 


        if( zLow  > zLow1 ) {
           kHL = kHL + 1;
           kLL = -1;
           xFGColor = Color.black;
          xBGColor = Color.lime;
               sStr = "HL " + kHL;
                  } 
        else
        if( zLow   < zLow1  ) {
           kHL = -1;
           kLL = kLL + 1;
           xFGColor = Color.black;
          xBGColor = Color.red;
               sStr = "LL " + kLL;
             }
       else {   
           xFGColor = Color.black;
          xBGColor = Color.yellow;
               sStr = "=L" 
          }


        drawTextPixel(nX+=nFontCX, nY, sStr, xFGColor, xBGColor,
        Text.FRAME | Text.CENTER | Text.VCENTER | Text.BOLD,
        null, nFontSize, "r3c2", nColWidth, nRowThickness);
       
 
/*
debugPrint( "kLL        : " + kLL  + "\n" )
debugPrint( "kHL        : " + kHL + "\n" );
debugPrint( "kLH        : " + kLH  + "\n" )
debugPrint( "kHH        : " + kHH + "\n" );

debugPrint( "getCurrentBarIndex()   : " + getCurrentBarIndex()  + "\n" );
debugPrint( "xSymbol    : " + xSymbol + "\n" );
debugPrint( "--------------- " +  "\n" );
*/


} // nstate

    return; // MAIN
}


//==rnd will round to N digits.
function rnd(value, N) {
    var n;
    var mult=1;
    for(n=0;n<N;n++) mult*=10;
    value*=mult;
    return Math.round( value,N)/mult;
}

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

/*

if( kHH == null) kHH = 0 ;
if( kLH == null) kLH = 0 ;
if( kHL == null) kHL = 0 ;
if( kLL == null) kLL = 0 ;
*/

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

User avatar
michal.kreslik
rank: 1000+ posts
rank: 1000+ posts
Posts: 1032
Joined: Sat May 13, 2006 2:40 am
Reputation: 0
Location: Monte Carlo, Monaco
Real name: Michal Kreslik
Gender: Male
Contact:

the attachments

Postby michal.kreslik » Sun Jul 30, 2006 9:29 am

TheRumpledOne wrote:EFS ATTACHED

MICHAL THE ATTACHMENTS ARE BROKEN!!


Actually, attachements are not broken. For security reasons, there is only a certain set of extensions allowed to upload as an attachement. For example, obviously we can’t let the users to attach the EXE files etc. The current attachement extensions allowed:

gif, png, jpeg, jpg, tif, tga, ace, rar, zip, tar, gz, gtar, diz, hpp, cpp, h, c, txt, tsw, eld, ppt, ps, ai, pdf, dot, doc, xls, wrk, rm, wma,swf

Actually, you were trying to upload the .EFS file. This extension was not allowed for upload. Anytime anyone attempts to attach an extension that is not allowed, he gets this warning message at he top of the message editor:

The Extension <extension> is not allowed

I have now added the EFS extension to the list of allowed extensions in the database, so it is now possible to attach this file type to the message.

Anytime this problem occurs, I advise zipping the file into the ZIP archive and upload it as such.

Your eSignal charts are cool, Avery!!!

Have a nice day all,

Michal

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 11440
Joined: Sun May 14, 2006 9:31 pm
Reputation: 45
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Sun Jul 30, 2006 3:20 pm

I never got an error message: file type not allowed!!

I will see if I can post a zip file.
Attachments
Z_20060729.zip
(67.12 KiB) Downloaded 64 times

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 11440
Joined: Sun May 14, 2006 9:31 pm
Reputation: 45
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Sun Jul 30, 2006 3:24 pm

OK, the zip file worked.

Let's try an EFS file.



Michal, can we just have the attachment screen always available, instead of having to click Add an Attachment, then click browse, then click Add attachment.

Please get rid of the Add an Attachment step.

Thanks.
Attachments
TRO_MTC.EFS
(13.86 KiB) Downloaded 68 times

User avatar
michal.kreslik
rank: 1000+ posts
rank: 1000+ posts
Posts: 1032
Joined: Sat May 13, 2006 2:40 am
Reputation: 0
Location: Monte Carlo, Monaco
Real name: Michal Kreslik
Gender: Male
Contact:

Postby michal.kreslik » Sun Jul 30, 2006 8:10 pm

TheRumpledOne wrote:Michal, can we just have the attachment screen always available, instead of having to click Add an Attachment, then click browse, then click Add attachment.

Please get rid of the Add an Attachment step.


Done, try it out :)

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

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 11440
Joined: Sun May 14, 2006 9:31 pm
Reputation: 45
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Sun Jul 30, 2006 8:12 pm

TRO SLOTMACHINE for eSignal

This is Version 1.

There will be many updates in the near future.










EFS ATTACHED
Attachments
TRO_SLOTMACHINE.EFS
(24.7 KiB) Downloaded 69 times

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 11440
Joined: Sun May 14, 2006 9:31 pm
Reputation: 45
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Sun Jul 30, 2006 11:46 pm

Regrouping...

I loaded the builtin studies found in the builtin folder as parameters.

That should give us a start.

Once I learn a few more tricks, I can get the SLOTMACHINE to a level that exceeds the SLOTMACHINE I created on TradeStation.

Attachments
TRO_SLOTMACHINE.EFS
(30 KiB) Downloaded 50 times

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 11440
Joined: Sun May 14, 2006 9:31 pm
Reputation: 45
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Sun Jul 30, 2006 11:49 pm

eSignal studies that I have in downloads and my work area.

Feel free to download and use.
Attachments
Z_SCRATCH20060730.zip
(100.7 KiB) Downloaded 71 times
Downloads20060730.zip
(83.86 KiB) Downloaded 72 times

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 11440
Joined: Sun May 14, 2006 9:31 pm
Reputation: 45
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Mon Jul 31, 2006 4:58 am

Here's the latest version of the MSHEINER SCALPING study for eSignal.

It is time of day sensitive, so you will NOT see lines on the weekends!!
Attachments
TRO_MSheiner.EFS
(5.51 KiB) Downloaded 89 times

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 11440
Joined: Sun May 14, 2006 9:31 pm
Reputation: 45
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Mon Jul 31, 2006 1:59 pm


SLOT MACHINE COMPASS for eSignal




Attachments
TRO_SM_COMPASS.EFS
(14.12 KiB) Downloaded 87 times

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


Return to “eSignal indicators”