Description:
Plots the cumulative delta (orders lifting offers - orders hitting bids) in a sub graph below the main chart for most chart types in TradeStation.
Usage:
The indicator plots the difference between Upticks and Downticks for each bar in a Hi-Lo bartype fashion. The close of the previous bar is the open of the new bar. It does not draw the wicks, just the open and close. The code maintains the running Upticks-Downticks tally in a bar and plots the difference realtime for the last bar on chart if update intrabar option is checked. It allows the trader to specify pit open/close times and the option to reset (start from 0) the cumulative delta at either the pit open time or the pit close time or both. A zero line can be plotted if required. Also allows the user to specify an Alert limit such that when the delta goes over this limit, that CD bar can be colored with the Alert Color. The Up Color and Down Color can also be specified.
Works on the following chart types:
Time
Tick (using Trade Vol instead of Tick Count for chart volume)
Volume (using Trade Vol instead of Tick Count for chart volume)
Momentum
Range
Input Parameters:
PitOpen - Time in HH24MM format (eg: 0800 for 8 AM and 1600 for 4 PM)
PitClose - Time in HH24MM format (eg: 0800 for 8 AM and 1600 for 4 PM)
ResetAtPitOpen - True/False values only
ResetAtPitClose - True/False values only
PlotZeroLine - True/False values only
AlertBar - Numerical, positive value only. The code uses an absolute value before comparing.
AlertColor - Any TradeStation color like Magenta, Cyan, Yellow, White etc.
UpColor - Any TradeStation color like Magenta, Cyan, Yellow, White etc.
DownColor - Any TradeStation color like Magenta, Cyan, Yellow, White etc.
December 26th, 2013
Size: 10.76 KB
Downloaded: 827 times
1466
LogicalTrader
//*** This is a tradestation version of the code Big Mike and Fat Tails have
uploaded here. I made several modifications as well. The sample
picture is inspired from BMT traders and many sharky templates.
//*** The sample picture contains Super trend and Double WMA Ultra Grad
Version 1: Modified Jan 2012 for tradestation ELD ***********
//**** added up dn color, added single or multi dot ***********
//**** added median price moving average logic
Options for the Pivot indicators: Floor pivots, pivot range, midpivots, floor pivots wide, Jackson Zones, Fibonacci pivots, Camarilla pivots, VWAP of the prior session
Options for the OHL indicators: Open, high and low of the current period, Fibonacci retracement levels calculated from current high and low, noise bands, target bands based on the average daily/weekly/monthly range.
Chart settings: Please set the right side margin under chart properties to 200 to allow for correct display of the labels. The colors are adapted to dark chart backgrounds.
Session templates: The indicators require the use of a correct session template for the instrument shown on the chart. With an ETH template only ETH pivots, ETH OHL and ETH noise and target bands can be displayed. For displaying RTH pivots, it is recommend to use a multi-session template that divides the day into the night session, regular session and after-session.
Use of daily data on intraday charts: The 3 pivot indicators are designed to load daily data, if the option for "Calculate from session" is set to “Daily Bars”. This the data used by the indicator:
"Calculate from session" = "DailyBars": Pivots are entirely calculated from daily data.
"Calculate from session" = "ETH" & "Settlement/Close" = "DailyBars": High and low are taken from the full intraday sessions. The close or settlement price is taken from daily data.
"Calculate from session" = "RTH" & "Settlement/Close" = "DailyBars": High and low are taken from the regular intraday sessions. The close or settlement price is taken from daily data.
"Calculate from session" = "ETH" & "Settlement/Close" = "Intraday Close": High and low are taken from the full intraday sessions. The close is the last price traded for the full session.
"Calculate from session" = "RTH" & "Settlement/Close" = "Intraday Close": High and low are taken from the regular intraday sessions. The close is the last price traded for the regular session.
Auto setting for the 3 pivot indicators: The Auto setting will preselect ETH for FOREX and all CME currency futures, but preselect RTH for all other instruments.
VWAP: The VWAP of the prior day is always calculated from intraday data. Depending on the chart resolution it can be a few ticks off the correct value.
Auto setting for the 3 OHL indicators: The Auto setting will preselect the third intraday-session as the regular session for FOREX & currency futures, but preselect the second intraday-session for all other instruments.
Noise Bands: The OHL indicators can be used to display noise bands. The noise is determined by averaging the smaller move Min (High – Open, Open – Low) over N1 & N2 days. The average values are displayed in a data table. The noise is added to and subtracted from the current open.
Target Bands: The OHL indicators can be used to display target bands. The targets can be determined in two different ways: Either the average daily range over N1 & N2 days is added to the current low (high projection) or subtracted from the current high (low projection), or the daily expansion from the open Max(High – Open, Open – Low) is averaged over N1 & N2 days and added to and subtracted from the open. The average daily range or average daily expansion is shown in the data table.
GLOBEX holiday sessions with settlement next day: The indicators are preconfigured for Globex holiday sessions without settlement for trade date next day or later. These trade dates are President’s Day, Martin-Luther-King Day, Memorial Day, Independence Day, Labour Day and Thanksgiving. The indicators will display double day sessions for these days for all GLOBEX and NYMEX traded instruments.
Update Jan 23 2011: Globex Holiday Calendar for 2011. Holiday sessions will only be applied to Globex instruments. Price markers are now correctly formatted for US interest rate futures and FOREX.
Update May 17, 2011: New signature for GetNextBeginEnd() implemented.
Update May 24, 2011: Due to a bug, the new signature for GetNextBeginEnd() is only implemented for OnBarUpdate() but not for Plot() Override.
Update June 21, 2011: The indicator now works with half-pip FOREX feeds. Indicator dialogue box improved.
Update July 11, 2011: Indicator reshaped, small bug removed that affected weekly ETH pivots after a holiday that fell on a Monday.
Update July 20, 2011: Serialization of the plots changed.
Update December 12, 2011: Levels R5, S5 added. Some labels changed. Label size is now adjustable. Globex Holiday Calendar for 2012 added.
Update January 6, 2012: Holiday fields added for anaCurrentDayOHLV38
Update June 20, 2012: Shading added for Pivot Range and Jackson Zones
Update February 16, 2013: Indicators entirely redesigned. Holiday calendar added for 2013. The former SessionNoiseBands & Session Volatility Bands have now been integrated into the CurrentOHL indicators.
Update March 11, 2013: No added features, but 2 bugs removed that had affected the plots with specific settings.
Update March 13, 2013: Bug removed, RTH pivots did not work, when data table was unselected.
Update April 10, 2013: Plot modified for compatibility with charts built from multiple bar series
Update May 10, 2013: Regular close can now be displayed for the remaining hours of the trading day. Bug removed, which led to occasional false identification of the RTH session on charts built from ticks.
Update December 9, 2013: Holiday calendar added for 2014.
Update January 22, 2013: CurrentDayOHLV42 did not display pivots for prior days when set to RTH. Bug removed.
Update September 17, 2014: With indicator setting "RTH" current day's range is now displayed as 0 during the night session.
Update September 20, 2014: Minor update, data table for ADR/ADN now plots on top of the indicator plots. Indicator plots can now be accessed via SHIFT + mouse wheel to change the Z-Order of the indicator.
Update December 28, 2014: Holiday calendar added for 2015. Price markers improved for US interest rate futures.
Update February 11, 2015: Minor update. Formatting of ATR/Noise improved for currency pairs with quote currency JPY.
Detailed explanations how to use the indicator can be found here:
This indicator is the easy language version. It will plot above a bar for indications to go long, below the bar for shorts. Select the style to be points, weight and color to whatever you like. The offset input value is for how far above/below the bar a plot should be, so use a small value like 0.0002 for 6E and a larger value for TF like 0.2. The debug input value can be toggled to view the state of the conditions in the commentary.
March 9th, 2023 05:21 PM MONICAP hello, and thanks for your time developing and sharing this indicator. i want to ask if this could be available for NT8
also. thank you
September 16th, 2022 07:30 PM TomTownsend Very helpful, thank you, and for all you do!!!
February 19th, 2019 06:43 AM Anand Jagdeo good morning. I am fairly new to trading and would like to use this indicator. am i supposed to change the dates for the
se holidays to the current year. Please advise. Seems like a pretty good indicator if applied properly. Thanks
Anand
June 9th, 2017 11:10 AM mercyj does anyone know why I can't set the autoscale to FALSE? it's greyed out. and the pivots are all wacko on the chart