Open in Interactive Outlook Client

Re: Emini Addict

From: ThinkScripter <thinkscripter@gmail.com>
To: Emini Addict
Received: Thursday, May 14, 2009 01:32 PM
No worries David. I realize folks will use my code and I encourage it. I just don't expect people to take credit for it. Keep up the good work.
Eric


On May 14, 2009, at 7:23 AM, Emini Addict wrote:

I had no idea that it was a spinoff of your code. I'm sorry. That would piss me off too. I'll get a plug in for you.

On Wed, May 13, 2009 at 8:07 AM, ThinkScripter <thinkscripter@gmail.com> wrote:
David

I don't Crash "Borrowing" my code as I hope my site is educational and gets more people scripting, BUT it would be nice if he referenced where the code came from when he used so much of it. It is very easy to spot one's own code, especially when there are nuanced errors in the code that, while they work, are kludges. 


Eric


On May 13, 2009, at 3:07 AM, Emini Addict wrote:

Emini Addict

The Crash Half Gap ThinkScript Code

Posted: 12 May 2009 11:15 PM PDT

A special thanks goes out to Crash for coding this up. It is based on the cash close (4pm) which gives us a true trading hours only pivot point for the day. 



# Emini Addict
# Half Gap Fill, Full Gap Fill, and
# Trading Hours only Pivot Point (9:30a - 4:00p).
# This study is intended for the 15 minute chart only.
# No warranties or guarantees. Modify at your own risk.
# $V:build_1324:2009.05.09:1.0.3

input Show_Today_Only = {"Yes", default "No"};
input Hide_GapFills_Once_Hit = {"Yes", default "No"};
input Display_24Hour_Pivot = {"Yes", default "No"};

def OPEN_ACTUAL_TIME = 0930;
def CLOSE_ACTUAL_TIME = 1600;
def OPEN_OFFSET_TIME = 0945;
def GLOBEX_CLOSE_TIME = 1615;


def goPlot = if(getDay() == getLastDay(), 1, if(Show_Today_Only, 1, 0));
def isAllowed = if(getAggregationPeriod() == 900000, 1, 0);
def isMarketOpen = if(if(secondsTillTime(OPEN_OFFSET_TIME) > 0, 0, 1) and !if(secondsTillTime(CLOSE_ACTUAL_TIME) > 0, 0, 1), 1, 0);
def isFirstBar = if (getDay()[1] != getDay(), 1, 0);
def isOpeningBell = if (secondsTillTime(OPEN_OFFSET_TIME)[1] > 0 and
secondsTillTime(OPEN_OFFSET_TIME) <= 0 or
(secondsTillTime(OPEN_OFFSET_TIME)[1] < secondsTillTime(OPEN_OFFSET_TIME)
and secondsTillTime(OPEN_OFFSET_TIME)[1] > 0), 1, 0);
def isGlobexDisplay = if(Display_24Hour_Pivot,0,1);
def isClosingBell = if( secondsTillTime(CLOSE_ACTUAL_TIME)[1] > 0 and
secondsTillTime(CLOSE_ACTUAL_TIME) <= 0 or
(secondsTillTime(CLOSE_ACTUAL_TIME)[1] < secondsTillTime(CLOSE_ACTUAL_TIME)
and secondsTillTime(CLOSE_ACTUAL_TIME)[1] > 0), 1, 0);

def isGlobexClose = if( secondsTillTime(GLOBEX_CLOSE_TIME)[1] > 0 and
secondsTillTime(GLOBEX_CLOSE_TIME) <= 0 or
(secondsTillTime(GLOBEX_CLOSE_TIME)[1] < secondsTillTime(GLOBEX_CLOSE_TIME)
and secondsTillTime(GLOBEX_CLOSE_TIME)[1] > 0), 1, 0);

def isTradingHrs = if((secondsFromTime(OPEN_ACTUAL_TIME) >= 0 && secondsTillTime(CLOSE_ACTUAL_TIME) > 0), 1, 0);

rec marketHoursHigh = if(high > marketHoursHigh[1] and isMarketOpen, high, if(isMarketOpen and !isFirstBar, marketHoursHigh[1], high));
rec regHoursLow = if(low < regHoursLow[1] and isMarketOpen, low, if(isMarketOpen and regHoursLow[1] > 0 and !isFirstBar, regHoursLow[1], low));
rec valueAtClose = compoundValue(1, if isClosingBell then close[1] else valueAtClose[1], close);
rec prevClose = compoundValue(1, if isClosingBell then valueAtClose else prevClose[1], close);
rec prevHigh = compoundValue(1, if isClosingBell then marketHoursHigh[1] else prevHigh[1], high);
rec prevLow = compoundValue(1, if isClosingBell then regHourslow[1] else prevlow[1], low);
rec regHoursOpen = compoundValue(1, if isOpeningBell then open[1] else regHoursOpen[1], open);
rec valueAtGlobexClose = compoundValue(1, if isGlobexClose then close[1] else valueAtGlobexClose[1], close);
rec globexClose = compoundValue(1, if isGlobexClose then valueAtGlobexClose else globexClose[1], close);

plot Pivot_Point = if(isAllowed && goPlot && isTradingHrs, (prevClose + prevHigh + prevLow) / 3, double.nan);
Pivot_Point.SetStyle(curve.POINTS);
Pivot_Point.SetDefaultColor(color.cyan);

plot Half_GapFill = if(isAllowed && goPlot && isTradingHrs, if( secondsTillTime(OPEN_ACTUAL_TIME) <= 0 && secondsTillTime(OPEN_OFFSET_TIME) > 0, prevClose + (open - prevClose) / 2, prevClose + (regHoursOpen - prevClose) / 2), double.nan);
Half_GapFill.SetDefaultColor(color.lime);
Half_GapFill.SetStyle(curve.POINTS);
Half_GapFill.setHiding(!Hide_GapFills_Once_Hit);

plot Full_GapFill = if(isAllowed && goPlot && isTradingHrs, prevClose, double.nan);
Full_GapFill.SetStyle(curve.POINTS);
Full_GapFill.SetDefaultColor(color.white);
Full_GapFill.setHiding(!Hide_GapFills_Once_Hit);

plot Globex_Pivot = if(isAllowed && goPlot && isGlobexDisplay && isTradingHrs, (globexClose + prevHigh + prevLow) / 3, double.nan);
Globex_Pivot.SetStyle(curve.POINTS);
Globex_Pivot.SetDefaultColor(Color.LIGHT_GREEN);
   

Emini Futures Market Analysis for Wednesday

Posted: 12 May 2009 11:11 PM PDT

   

This posting includes an audio/video/photo media file: Download Now

You are subscribed to email updates from Emini Addict 
To stop receiving these emails, you may unsubscribe now.
Email delivery powered by Google
Inbox too full? (feed) Subscribe to the feed version of Emini Addict in a feed reader.
If you prefer to unsubscribe via postal mail, write to: Emini Addict, c/o Google, 20 W Kinzie, Chicago IL USA 60610