Dark Theme
Light Theme
Welcome to NexusFi: the best trading community on the planet, with over 200,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to
register in order to view the content of the threads and start contributing to our community.
It's free for basic access, or support us by becoming an Elite Member -- discounts are available after registering.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Updated December 18, 2022
Top Posters
looks_one
mfbreakout
with 195 posts (185 thanks)
looks_two
Fat Tails
with 92 posts (261 thanks)
looks_3
sysot1t
with 21 posts (2 thanks)
looks_4
forrestang
with 20 posts (4 thanks)
Best Posters
looks_one
silver99
with 4.7 thanks per post
looks_two
Fat Tails
with 2.8 thanks per post
looks_3
dandxg
with 2 thanks per post
looks_4
mfbreakout
with 0.9 thanks per post
trending_up
606,086 views
thumb_up
599 thanks given
group
119 followers
forum
541 posts
attach_file
163 attachments
May 5th, 2012, 01:44 PM
Oslo, Norway
Experience: Advanced
Platform: CQG, Excel
Trading: CL
Posts: 1,193 since Apr 2010
rcabri
Thanks, but it's missing one video.
MissEuroCent
Excellent! Thanks a lot!
May 5th, 2012, 08:53 PM
Auckland, New Zealand
Experience: Intermediate
Platform: Multiple
Trading: Futures
Posts: 8 since Nov 2011
Thanks Given: 14
Thanks Received: 5
Had been looking for the 3rd video since it wasn't uploaded to vimeo. Thanks!
May 6th, 2012, 11:38 AM
Boise Idaho usa
Experience: Advanced
Platform: Mirus futures
Broker: Iq feed
Trading: ES,CL,NG,GC
Posts: 13 since Jan 2011
Thanks Given: 198
Thanks Received: 21
MissEuroCent
I have been looking on the web for a while for the other videos like this list thank you so much for posting them !!!!
May 6th, 2012, 01:39 PM
Manta, Ecuador
Site Administrator Developer Swing Trader
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,557
If these videos are public domain, it would be best to attach them directly to your post. Attachments can be up to 1GB each when zipped, and up to 256MB each for mp4 or flv videos. If video is WMV or AVI, zip it first.
Mike
June 10th, 2012, 03:20 PM
Long Island, NY
Experience: Advanced
Platform: TOS
Broker: Charles Schwab
Trading: Equities, index options and futures options
Posts: 194 since Apr 2010
Thanks Given: 69
Thanks Received: 207
I wrote these indicators for eSignal back in 2006 to trade the ACD system. Feel free to translate to other languages:
/***
This formula will display the high/low lines of the opening range and
the A & C lines for the day based on the book "The Logical Trader".
***/
function preMain() {
setPriceStudy(true);
setStudyTitle("ACD System");
setCursorLabelName("30m H", 0);
setCursorLabelName("30m L", 1);
setCursorLabelName("C Up ", 2);
setCursorLabelName("A Up ", 3);
setCursorLabelName("A Down", 4);
setCursorLabelName("C Down", 5);
setDefaultBarFgColor(Color.blue, 0);
setDefaultBarFgColor(Color.blue, 1);
setDefaultBarFgColor(Color.green, 2);
setDefaultBarFgColor(Color.green, 3);
setDefaultBarFgColor(Color.red, 4);
setDefaultBarFgColor(Color.red, 5);
setDefaultBarThickness(1, 0);
setDefaultBarThickness(1, 1);
setDefaultBarThickness(1, 2);
setDefaultBarThickness(1, 3);
setDefaultBarThickness(1, 4);
setDefaultBarThickness(1, 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);
var fp1 = new FunctionParameter("nMin", FunctionParameter.NUMBER);
fp1.setName("Number of Minutes");
fp1.setLowerLimit(1);
fp1.setDefault(60);
var fp2 = new FunctionParameter("nThickness", FunctionParameter.NUMBER);
fp2.setName("Line Thickness");
fp2.setLowerLimit(1);
fp2.setDefault(1);
var fp3 = new FunctionParameter("cColorH", FunctionParameter.COLOR);
fp3.setName("High Color");
fp3.setDefault(Color.RGB(0,0,192));
var fp4 = new FunctionParameter("cColorL", FunctionParameter.COLOR);
fp4.setName("Low Color");
fp4.setDefault(Color.RGB(0,0,192));
var fp5 = new FunctionParameter("nTicksA", FunctionParameter.NUMBER);
fp5.setName("Ticks for A");
fp5.setLowerLimit(.01);
fp5.setDefault(1)
var fp6 = new FunctionParameter("nTicksC", FunctionParameter.NUMBER);
fp6.setName("Ticks for C");
fp6.setLowerLimit(.01);
fp6.setDefault(1)
var fp7 = new FunctionParameter("cColorCUp", FunctionParameter.COLOR);
fp7.setName("C Up Color");
fp7.setDefault(Color.RGB(0,133,0));
var fp8 = new FunctionParameter("cColorAUp", FunctionParameter.COLOR);
fp8.setName("A Up Color");
fp8.setDefault(Color.RGB(0,133,0));
var fp9 = new FunctionParameter("cColorADown", FunctionParameter.COLOR);
fp9.setName("A Down Color");
fp9.setDefault(Color.RGB(192,0,0));
var fp10 = new FunctionParameter("cColorCDown", FunctionParameter.COLOR);
fp10.setName("C Down Color");
fp10.setDefault(Color.RGB(192,0,0));
}
var bEdit = true;
var bActive = true;
var nDayCntr = 0;
var vStartTime = null;
var vHigh = null;
var vLow = null;
var FirstBar = null;
function main(nMin, nThickness, cColorH, cColorL, cColorCUp, cColorAUp, cColorADown, cColorCDown, nTicksA, nTicksC) {
if (nMin == null) nMin = 60;
if (bEdit == true) {
nMin = Math.round(nMin);
setCursorLabelName(nMin + "min H", 0);
setCursorLabelName(nMin + "min L", 1);
setDefaultBarThickness(nThickness, 0);
setDefaultBarThickness(nThickness, 0);
setDefaultBarFgColor(cColorH, 0);
setDefaultBarFgColor(cColorL, 1);
setDefaultBarFgColor(cColorCUp, 2);
setDefaultBarFgColor(cColorAUp, 3);
setDefaultBarFgColor(cColorADown, 4);
setDefaultBarFgColor(cColorCDown, 5);
bEdit = false;
}
if (getDay() != getDay(-1) || vHigh == null || vLow == null) {
bActive = true;
nDayCntr += 1;
vStartTime = getValue("Time");
vHigh = high();
vLow = low();
}
FirstBar = getFirstBarIndexOfDay(vStartTime);
var vTime = getValue("Time");
// 3,600,000 milliseconds = 1 hour
// 60,000 milliseconds = 1 minute
if ((vTime - vStartTime)/60000 < nMin) {
vHigh = Math.max(high(), vHigh);
vLow = Math.min(low(), vLow);
} else {
bActive = false;
}
if (FirstBar != null) {
drawLineRelative( FirstBar, vHigh, 1, vHigh, PS_DASHDOT, nThickness,cColorH, "Hline");
drawTextRelative( 2, vHigh, vHigh.toFixed(2), cColorH, null, Text.VCENTER|Text.BOLD, null, 11, "High");
drawLineRelative( FirstBar, vHigh+nTicksC, 1,vHigh+nTicksC, PS_DOT, nThickness, cColorCUp, "CUp");
drawTextRelative( 2, vHigh+nTicksC, (vHigh+nTicksC).toFixed(2), cColorCUp, null, Text.VCENTER|Text.BOLD, null, 11, "CUp");
drawLineRelative( FirstBar, vHigh+nTicksA, 1,vHigh+nTicksA, PS_DASH, nThickness, cColorAUp, "AUp");
drawTextRelative( 2, vHigh+nTicksA, (vHigh+nTicksA).toFixed(2), cColorAUp, null, Text.VCENTER|Text.BOLD, null, 11, "AUp");
drawLineRelative( FirstBar, vLow, 1, vLow, PS_DASHDOT, nThickness, cColorL, "Lline")
drawTextRelative( 2, vLow, vLow.toFixed(2), cColorL, null, Text.VCENTER|Text.BOLD, null, 11, "Low");
drawLineRelative( FirstBar, vLow-nTicksA, 1,vLow-nTicksA, PS_DASH, nThickness, cColorADown, "ADown");
drawTextRelative( 2, vLow-nTicksA, (vLow-nTicksA).toFixed(2), cColorADown, null, Text.VCENTER|Text.BOLD, null, 11, "ADown");
drawLineRelative( FirstBar, vLow-nTicksC, 1,vLow-nTicksC, PS_DOT, nThickness, cColorCDown, "CDown");
drawTextRelative( 2, vLow-nTicksC, (vLow-nTicksC).toFixed(2), cColorCDown, null, Text.VCENTER|Text.BOLD, null, 11, "CDown");
}
if (bActive == false) {
return new Array(vHigh.toFixed(2), vLow.toFixed(2),(vHigh+nTicksC).toFixed(2),(vHigh+nTicksA).toFixed(2),
(vLow-nTicksA).toFixed(2),(vLow-nTicksC).toFixed(2));
}
return null;
}
/****************************************************************************************************
This study generates the Pivot Range from the book "The Logical Trader"
****************************************************************************************************/
function preMain() {
setPriceStudy(true);
setStudyTitle("ACD Pivot Range");
setCursorLabelName("PR1", 0);
setCursorLabelName("PR2", 1);
// Pivot Range 1
setDefaultBarStyle(PS_SOLID, 0);
setDefaultBarFgColor(Color.RGB(40,40,40), 0);
setDefaultBarThickness(1, 0);
// Pivot Range 2
setDefaultBarStyle(PS_SOLID, 1);
setDefaultBarFgColor(Color.RGB(40,40,40), 1);
setDefaultBarThickness(1, 1);
}
// Start of Performance addition
var vLastRawTime = null;
var vLastPR1 = null;
var vLastPR2 = null;
var vLastArray = null;
var vSymbol = null;
var vInterval = null;
var vReset = true;
var vDisplayDate = null;
var bDisplay = false;
function main(nDays) {
if (vDisplayDate == null) {
if (nDays == null) nDays = 5;
var msPerDay = (24 * 60 * 60 * 1000);
vDisplayDate = new Date() *1;
vDisplayDate = vDisplayDate - ((nDays+2)*msPerDay);
vDisplayDate = new Date(vDisplayDate);
}
if (bDisplay == false && getDay(0) != getDay(-1)) {
var vDate = getValue("Time");
vDate = new Date(vDate);
if (vDate >= vDisplayDate) {
bDisplay = true;
}
}
if (bDisplay == false) return;
var vH;
var vL;
var vC;
var vRawTime;
var vBarTime;
var vIndex;
var nState = getBarState();
if(vReset == true) {
vLastRawTime = null;
vLastArray = null;
vLastPR1 = null;
vLastPR2 = null;
vInterval = getInterval();
vSymbol = getSymbol();
vSymbol += ",D";
vReset = false;
}
//vRawTime = getValue("rawtime"); // does not work properly with 1 min interval
vRawTime = getDay();
if(vRawTime == null)
return;
//vRawTime = Math.floor(vRawTime / RawTime.DAY);
// Start of Performance addition
if(vRawTime != null && vLastRawTime != null) {
if(vRawTime == vLastRawTime) {
return vLastArray;
// return new Array(vLastPR1, vLastPR2);
}
}
if(vInterval == null)
return null;
if(vInterval == "D")
return null;
if(vInterval == "W")
return null;
if(vInterval == "M")
return null;
if(vInterval == "T")
return null;
vBarTime = getValue("time");
if(vBarTime != null) {
var vDay = vBarTime.getDay();
if (vDay == 0) {
var vDate = vBarTime.getDate();
vDate -= 2;
vBarTime.setDate(vDate);
}
vAbsTime = getPreviousTradingDay(vBarTime, vSymbol);
if(vAbsTime == null) {
return;
}
vIndex = getFirstBarIndexOfDay(vAbsTime, vSymbol);
if(vIndex != null) {
vH = getValueAbsolute("High", vIndex, vSymbol);
vL = getValueAbsolute("Low", vIndex, vSymbol);
vC = getValueAbsolute("Close", vIndex, vSymbol);
if(vH != null && vL != null && vC != null) {
vLastPR1 = ((vH+vL+vC)/3)+(((vH+vL+ vC)/3)-((vH+vL)/2))
vLastPR2 = ((vH+vL+vC)/3)-(((vH+vL+ vC)/3)-((vH+vL)/2))
vLastRawTime = vRawTime;
vLastArray = new Array(vLastPR1, vLastPR2);
drawLineAbsolute(0,vLastPR1,1,vLastPR1,PS_SOLID,1,Color.RGB(40,40,40),10);
drawTextAbsolute( 9, vLastPR1, vLastPR1.toFixed(2), Color.RGB(40,40,40), null, Text.VCENTER|Text.BOLD, null, 11, "PR1");
drawLineAbsolute(0,vLastPR2,1,vLastPR2,PS_SOLID,1,Color.RGB(40,40,40),20);
drawTextAbsolute( 9, vLastPR2, vLastPR2.toFixed(2), Color.RGB(40,40,40), null, Text.VCENTER|Text.BOLD, null, 11, "PR2");
return vLastArray;
}
}
}
return null;
}
//{{EFSWizard_Description
//
// This formula generates the Pivot Moving Averages described in the book "The Logical Trader".
//
//}}EFSWizard_Description
//{{EFSWizard_Declarations
var vSMA14_of_HLC3 = new MAStudy(14, 1, "HLC/3", MAStudy.SIMPLE);
var vSMA30_of_HLC3 = new MAStudy(30, 1, "HLC/3", MAStudy.SIMPLE);
var vSMA50_of_HLC3 = new MAStudy(50, 1, "HLC/3", MAStudy.SIMPLE);
var vLastAlert = -1;
//}}EFSWizard_Declarations
function preMain() {
/**
* This function is called only once, before any of the bars are loaded.
* Place any study or EFS configuration commands here.
*/
//{{EFSWizard_PreMain
setPriceStudy(true);
setStudyTitle("ACD Pivot Moving Averages");
setCursorLabelName("14PMA", 0);
setCursorLabelName("30PMA", 1);
setCursorLabelName("50PMA", 2);
setDefaultBarStyle(PS_SOLID, 0);
setDefaultBarStyle(PS_SOLID, 1);
setDefaultBarStyle(PS_SOLID, 2);
setDefaultBarFgColor(Color.RGB(255,215,0), 0);
setDefaultBarFgColor(Color.RGB(0,0,255), 1);
setDefaultBarFgColor(Color.RGB(255,0,0), 2);
setDefaultBarThickness(1, 0);
setDefaultBarThickness(1, 1);
setDefaultBarThickness(1, 2);
setPlotType(PLOTTYPE_LINE, 0);
setPlotType(PLOTTYPE_LINE, 1);
setPlotType(PLOTTYPE_LINE, 2);
//}}EFSWizard_PreMain
}
function main() {
/**
* The main() function is called once per bar on all previous bars, once per
* each incoming completed bar, and if you don't have 'setComputeOnClose(true)'
* in your preMain(), it is also called on every tick.
*/
//{{EFSWizard_Expressions
//{{EFSWizard_Expression_1
//}}EFSWizard_Expression_1
//}}EFSWizard_Expressions
//{{EFSWizard_Return
return new Array(
vSMA14_of_HLC3.getValue(MAStudy.MA),
vSMA30_of_HLC3.getValue(MAStudy.MA),
vSMA50_of_HLC3.getValue(MAStudy.MA)
);
//}}EFSWizard_Return
}
function postMain() {
/**
* The postMain() function is called only once, when the EFS is no longer used for
* the current symbol (ie, symbol change, chart closing, or application shutdown).
*/
}
//{{EFSWizard_Actions
//{{EFSWizard_Action_1
function onAction1() {
vLastAlert = 1;
}
//}}EFSWizard_Action_1
//}}EFSWizard_Actions
June 10th, 2012, 03:58 PM
Berlin, Europe
Market Wizard
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114
@Bookworm :
1) Does the code use the settlement price or the close for futures?
2) Does it calculate ETH or RTH pivots (I think that Mark Fisher originally used RTH, but then switched do ETH)
3) Does it include the A and C levels for trading breakouts?
4) Would you have a chart?
Thank you.
June 10th, 2012, 06:25 PM
austin, texas
Experience: Intermediate
Platform: ninja trader
Trading: currency futures
Posts: 505 since Jan 2011
Thanks Given: 14
Thanks Received: 234
Fat Tails
@
Bookworm :
1) Does the code use the settlement price or the close for futures?
2) Does it calculate ETH or RTH pivots (I think that Mark Fisher originally used RTH, but then switched do ETH)
3) Does it include the A and C levels for trading breakouts?
4) Would you have a chart?
Thank you.
Fat Tails it would be great if you could translate this into Nijna. I have been waiting forever for this indicator. I am surprised no one else has requested for help with this indicator. Right now I currently draw it by hand and this would really save me some time. Hope it can be figured out.
Thanks
Hector
June 10th, 2012, 06:26 PM
austin, texas
Experience: Intermediate
Platform: ninja trader
Trading: currency futures
Posts: 505 since Jan 2011
Thanks Given: 14
Thanks Received: 234
Bookworm
I wrote these indicators for eSignal back in 2006 to trade the ACD system. Feel free to translate to other languages:
/***
This formula will display the high/low lines of the opening range and
the A & C lines for the day based on the book "The Logical Trader".
***/
function preMain() {
setPriceStudy(true);
setStudyTitle("ACD System");
setCursorLabelName("30m H", 0);
setCursorLabelName("30m L", 1);
setCursorLabelName("C Up ", 2);
setCursorLabelName("A Up ", 3);
setCursorLabelName("A Down", 4);
setCursorLabelName("C Down", 5);
setDefaultBarFgColor(Color.blue, 0);
setDefaultBarFgColor(Color.blue, 1);
setDefaultBarFgColor(Color.green, 2);
setDefaultBarFgColor(Color.green, 3);
setDefaultBarFgColor(Color.red, 4);
setDefaultBarFgColor(Color.red, 5);
setDefaultBarThickness(1, 0);
setDefaultBarThickness(1, 1);
setDefaultBarThickness(1, 2);
setDefaultBarThickness(1, 3);
setDefaultBarThickness(1, 4);
setDefaultBarThickness(1, 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);
var fp1 = new FunctionParameter("nMin", FunctionParameter.NUMBER);
fp1.setName("Number of Minutes");
fp1.setLowerLimit(1);
fp1.setDefault(60);
var fp2 = new FunctionParameter("nThickness", FunctionParameter.NUMBER);
fp2.setName("Line Thickness");
fp2.setLowerLimit(1);
fp2.setDefault(1);
var fp3 = new FunctionParameter("cColorH", FunctionParameter.COLOR);
fp3.setName("High Color");
fp3.setDefault(Color.RGB(0,0,192));
var fp4 = new FunctionParameter("cColorL", FunctionParameter.COLOR);
fp4.setName("Low Color");
fp4.setDefault(Color.RGB(0,0,192));
var fp5 = new FunctionParameter("nTicksA", FunctionParameter.NUMBER);
fp5.setName("Ticks for A");
fp5.setLowerLimit(.01);
fp5.setDefault(1)
var fp6 = new FunctionParameter("nTicksC", FunctionParameter.NUMBER);
fp6.setName("Ticks for C");
fp6.setLowerLimit(.01);
fp6.setDefault(1)
var fp7 = new FunctionParameter("cColorCUp", FunctionParameter.COLOR);
fp7.setName("C Up Color");
fp7.setDefault(Color.RGB(0,133,0));
var fp8 = new FunctionParameter("cColorAUp", FunctionParameter.COLOR);
fp8.setName("A Up Color");
fp8.setDefault(Color.RGB(0,133,0));
var fp9 = new FunctionParameter("cColorADown", FunctionParameter.COLOR);
fp9.setName("A Down Color");
fp9.setDefault(Color.RGB(192,0,0));
var fp10 = new FunctionParameter("cColorCDown", FunctionParameter.COLOR);
fp10.setName("C Down Color");
fp10.setDefault(Color.RGB(192,0,0));
}
var bEdit = true;
var bActive = true;
var nDayCntr = 0;
var vStartTime = null;
var vHigh = null;
var vLow = null;
var FirstBar = null;
function main(nMin, nThickness, cColorH, cColorL, cColorCUp, cColorAUp, cColorADown, cColorCDown, nTicksA, nTicksC) {
if (nMin == null) nMin = 60;
if (bEdit == true) {
nMin = Math.round(nMin);
setCursorLabelName(nMin + "min H", 0);
setCursorLabelName(nMin + "min L", 1);
setDefaultBarThickness(nThickness, 0);
setDefaultBarThickness(nThickness, 0);
setDefaultBarFgColor(cColorH, 0);
setDefaultBarFgColor(cColorL, 1);
setDefaultBarFgColor(cColorCUp, 2);
setDefaultBarFgColor(cColorAUp, 3);
setDefaultBarFgColor(cColorADown, 4);
setDefaultBarFgColor(cColorCDown, 5);
bEdit = false;
}
if (getDay() != getDay(-1) || vHigh == null || vLow == null) {
bActive = true;
nDayCntr += 1;
vStartTime = getValue("Time");
vHigh = high();
vLow = low();
}
FirstBar = getFirstBarIndexOfDay(vStartTime);
var vTime = getValue("Time");
// 3,600,000 milliseconds = 1 hour
// 60,000 milliseconds = 1 minute
if ((vTime - vStartTime)/60000 < nMin) {
vHigh = Math.max(high(), vHigh);
vLow = Math.min(low(), vLow);
} else {
bActive = false;
}
if (FirstBar != null) {
drawLineRelative( FirstBar, vHigh, 1, vHigh, PS_DASHDOT, nThickness,cColorH, "Hline");
drawTextRelative( 2, vHigh, vHigh.toFixed(2), cColorH, null, Text.VCENTER|Text.BOLD, null, 11, "High");
drawLineRelative( FirstBar, vHigh+nTicksC, 1,vHigh+nTicksC, PS_DOT, nThickness, cColorCUp, "CUp");
drawTextRelative( 2, vHigh+nTicksC, (vHigh+nTicksC).toFixed(2), cColorCUp, null, Text.VCENTER|Text.BOLD, null, 11, "CUp");
drawLineRelative( FirstBar, vHigh+nTicksA, 1,vHigh+nTicksA, PS_DASH, nThickness, cColorAUp, "AUp");
drawTextRelative( 2, vHigh+nTicksA, (vHigh+nTicksA).toFixed(2), cColorAUp, null, Text.VCENTER|Text.BOLD, null, 11, "AUp");
drawLineRelative( FirstBar, vLow, 1, vLow, PS_DASHDOT, nThickness, cColorL, "Lline")
drawTextRelative( 2, vLow, vLow.toFixed(2), cColorL, null, Text.VCENTER|Text.BOLD, null, 11, "Low");
drawLineRelative( FirstBar, vLow-nTicksA, 1,vLow-nTicksA, PS_DASH, nThickness, cColorADown, "ADown");
drawTextRelative( 2, vLow-nTicksA, (vLow-nTicksA).toFixed(2), cColorADown, null, Text.VCENTER|Text.BOLD, null, 11, "ADown");
drawLineRelative( FirstBar, vLow-nTicksC, 1,vLow-nTicksC, PS_DOT, nThickness, cColorCDown, "CDown");
drawTextRelative( 2, vLow-nTicksC, (vLow-nTicksC).toFixed(2), cColorCDown, null, Text.VCENTER|Text.BOLD, null, 11, "CDown");
}
if (bActive == false) {
return new Array(vHigh.toFixed(2), vLow.toFixed(2),(vHigh+nTicksC).toFixed(2),(vHigh+nTicksA).toFixed(2),
(vLow-nTicksA).toFixed(2),(vLow-nTicksC).toFixed(2));
}
return null;
}
/****************************************************************************************************
This study generates the Pivot Range from the book "The Logical Trader"
****************************************************************************************************/
function preMain() {
setPriceStudy(true);
setStudyTitle("ACD Pivot Range");
setCursorLabelName("PR1", 0);
setCursorLabelName("PR2", 1);
// Pivot Range 1
setDefaultBarStyle(PS_SOLID, 0);
setDefaultBarFgColor(Color.RGB(40,40,40), 0);
setDefaultBarThickness(1, 0);
// Pivot Range 2
setDefaultBarStyle(PS_SOLID, 1);
setDefaultBarFgColor(Color.RGB(40,40,40), 1);
setDefaultBarThickness(1, 1);
}
// Start of Performance addition
var vLastRawTime = null;
var vLastPR1 = null;
var vLastPR2 = null;
var vLastArray = null;
var vSymbol = null;
var vInterval = null;
var vReset = true;
var vDisplayDate = null;
var bDisplay = false;
function main(nDays) {
if (vDisplayDate == null) {
if (nDays == null) nDays = 5;
var msPerDay = (24 * 60 * 60 * 1000);
vDisplayDate = new Date() *1;
vDisplayDate = vDisplayDate - ((nDays+2)*msPerDay);
vDisplayDate = new Date(vDisplayDate);
}
if (bDisplay == false && getDay(0) != getDay(-1)) {
var vDate = getValue("Time");
vDate = new Date(vDate);
if (vDate >= vDisplayDate) {
bDisplay = true;
}
}
if (bDisplay == false) return;
var vH;
var vL;
var vC;
var vRawTime;
var vBarTime;
var vIndex;
var nState = getBarState();
if(vReset == true) {
vLastRawTime = null;
vLastArray = null;
vLastPR1 = null;
vLastPR2 = null;
vInterval = getInterval();
vSymbol = getSymbol();
vSymbol += ",D";
vReset = false;
}
//vRawTime = getValue("rawtime"); // does not work properly with 1 min interval
vRawTime = getDay();
if(vRawTime == null)
return;
//vRawTime = Math.floor(vRawTime / RawTime.DAY);
// Start of Performance addition
if(vRawTime != null && vLastRawTime != null) {
if(vRawTime == vLastRawTime) {
return vLastArray;
// return new Array(vLastPR1, vLastPR2);
}
}
if(vInterval == null)
return null;
if(vInterval == "D")
return null;
if(vInterval == "W")
return null;
if(vInterval == "M")
return null;
if(vInterval == "T")
return null;
vBarTime = getValue("time");
if(vBarTime != null) {
var vDay = vBarTime.getDay();
if (vDay == 0) {
var vDate = vBarTime.getDate();
vDate -= 2;
vBarTime.setDate(vDate);
}
vAbsTime = getPreviousTradingDay(vBarTime, vSymbol);
if(vAbsTime == null) {
return;
}
vIndex = getFirstBarIndexOfDay(vAbsTime, vSymbol);
if(vIndex != null) {
vH = getValueAbsolute("High", vIndex, vSymbol);
vL = getValueAbsolute("Low", vIndex, vSymbol);
vC = getValueAbsolute("Close", vIndex, vSymbol);
if(vH != null && vL != null && vC != null) {
vLastPR1 = ((vH+vL+vC)/3)+(((vH+vL+ vC)/3)-((vH+vL)/2))
vLastPR2 = ((vH+vL+vC)/3)-(((vH+vL+ vC)/3)-((vH+vL)/2))
vLastRawTime = vRawTime;
vLastArray = new Array(vLastPR1, vLastPR2);
drawLineAbsolute(0,vLastPR1,1,vLastPR1,PS_SOLID,1,Color.RGB(40,40,40),10);
drawTextAbsolute( 9, vLastPR1, vLastPR1.toFixed(2), Color.RGB(40,40,40), null, Text.VCENTER|Text.BOLD, null, 11, "PR1");
drawLineAbsolute(0,vLastPR2,1,vLastPR2,PS_SOLID,1,Color.RGB(40,40,40),20);
drawTextAbsolute( 9, vLastPR2, vLastPR2.toFixed(2), Color.RGB(40,40,40), null, Text.VCENTER|Text.BOLD, null, 11, "PR2");
return vLastArray;
}
}
}
return null;
}
//{{EFSWizard_Description
//
// This formula generates the Pivot Moving Averages described in the book "The Logical Trader".
//
//}}EFSWizard_Description
//{{EFSWizard_Declarations
var vSMA14_of_HLC3 = new MAStudy(14, 1, "HLC/3", MAStudy.SIMPLE);
var vSMA30_of_HLC3 = new MAStudy(30, 1, "HLC/3", MAStudy.SIMPLE);
var vSMA50_of_HLC3 = new MAStudy(50, 1, "HLC/3", MAStudy.SIMPLE);
var vLastAlert = -1;
//}}EFSWizard_Declarations
function preMain() {
/**
* This function is called only once, before any of the bars are loaded.
* Place any study or EFS configuration commands here.
*/
//{{EFSWizard_PreMain
setPriceStudy(true);
setStudyTitle("ACD Pivot Moving Averages");
setCursorLabelName("14PMA", 0);
setCursorLabelName("30PMA", 1);
setCursorLabelName("50PMA", 2);
setDefaultBarStyle(PS_SOLID, 0);
setDefaultBarStyle(PS_SOLID, 1);
setDefaultBarStyle(PS_SOLID, 2);
setDefaultBarFgColor(Color.RGB(255,215,0), 0);
setDefaultBarFgColor(Color.RGB(0,0,255), 1);
setDefaultBarFgColor(Color.RGB(255,0,0), 2);
setDefaultBarThickness(1, 0);
setDefaultBarThickness(1, 1);
setDefaultBarThickness(1, 2);
setPlotType(PLOTTYPE_LINE, 0);
setPlotType(PLOTTYPE_LINE, 1);
setPlotType(PLOTTYPE_LINE, 2);
//}}EFSWizard_PreMain
}
function main() {
/**
* The main() function is called once per bar on all previous bars, once per
* each incoming completed bar, and if you don't have 'setComputeOnClose(true)'
* in your preMain(), it is also called on every tick.
*/
//{{EFSWizard_Expressions
//{{EFSWizard_Expression_1
//}}EFSWizard_Expression_1
//}}EFSWizard_Expressions
//{{EFSWizard_Return
return new Array(
vSMA14_of_HLC3.getValue(MAStudy.MA),
vSMA30_of_HLC3.getValue(MAStudy.MA),
vSMA50_of_HLC3.getValue(MAStudy.MA)
);
//}}EFSWizard_Return
}
function postMain() {
/**
* The postMain() function is called only once, when the EFS is no longer used for
* the current symbol (ie, symbol change, chart closing, or application shutdown).
*/
}
//{{EFSWizard_Actions
//{{EFSWizard_Action_1
function onAction1() {
vLastAlert = 1;
}
//}}EFSWizard_Action_1
//}}EFSWizard_Actions
Thanks Book Worm, hopefully it can be translated into Ninja. Once again thanks.
Hector
June 11th, 2012, 10:10 AM
Long Island, NY
Experience: Advanced
Platform: TOS
Broker: Charles Schwab
Trading: Equities, index options and futures options
Posts: 194 since Apr 2010
Thanks Given: 69
Thanks Received: 207
Fat Tails
@
Bookworm :
1) Does the code use the settlement price or the close for futures?
2) Does it calculate ETH or RTH pivots (I think that Mark Fisher originally used RTH, but then switched do ETH)
3) Does it include the A and C levels for trading breakouts?
4) Would you have a chart?
Thank you.
I stopped using eSignal years ago and just found these indicators on an old disk stored away so no charts. To be honest, by now this is like high school Spanish, a vague memory. At the time I was trading NEM, the gold stock, using NYSE hours. For stocks, unlike commodities, the A & C values are the same but it's been so long I don't remember how this indicator shows them. If nothing else it should give someone with better coding skills than me a decent head start on updating them. Good luck!
June 11th, 2012, 10:46 AM
Tallinn, Estonia
Experience: Beginner
Platform: SC
Trading: NAS100
Posts: 958 since Nov 2010
@Fat Tails
Time template : Equity RTH East Coast
Last Updated on December 18, 2022