The "Squeeze"

eSignal indicators

Moderator: moderators

TxTrader
rank: <50 posts
rank: <50 posts
Posts: 4
Joined: Fri Sep 15, 2006 9:35 pm
Reputation: 0
Gender: Male

The "Squeeze"

Postby TxTrader » Thu Sep 21, 2006 6:00 pm

Hello all,

Here is the code for the squeeze. I would like to know if someone could add an alert for when the black dot appears? I would like to run this indicator on several charts and time frames and it gets confusing and tiring flipping thru charts all day.

Thanks to all for a super site and super work!


function preMain() {
setStudyTitle("FPSqueeze");
setCursorLabelName("FPSqueeze", 0);
setDefaultBarFgColor(Color.blue, 0);
setPlotType(PLOTTYPE_HISTOGRAM,0);
setDefaultBarThickness(4,0);

//addBand(0,PS_SOLID,1,Color.black,"zero");

var BBlow=null;
var BBhigh=null;
var KClow=null;
var KChigh=null;
var Mom=null;
var vHigh=null;
var vLow=null;
var vClose=null;

var fp1 = new FunctionParameter("nMA", FunctionParameter.NUMBER);
fp1.setName("Squeeze Moving Average");
fp1.setLowerLimit(1);
fp1.setDefault(20);

var fp2 = new FunctionParameter("nSD", FunctionParameter.NUMBER);
fp2.setName("Standard Deviation");
fp2.setLowerLimit (1);
fp2.setDefault(2.0);

var fp3 = new FunctionParameter("nColorSqueeze", FunctionParameter.COLOR);
fp3.setName("Squeeze Color");
fp3.setDefault(Color.red);

var fp4 = new FunctionParameter("nColorAction", FunctionParameter.COLOR);
fp4.setName("Action Color");
fp4.setDefault(Color.lime);
}
function ATR(nInputLength) {

var dSum = 0;

var dH = high(0, -nInputLength);

var dL = low(0, -nInputLength);

var dC = close(-1, -nInputLength);

if (dH == null || dL == null || dC == null) {

return;

}

for (i = 0; i < nInputLength; ++i) {

var vTrueHigh = Math.max(dH[i], dC[i]);

var vTrueLow = Math.min(dL[i], dC[i]);

var vTrueRange = (vTrueHigh - vTrueLow);

dSum += vTrueRange;

}

dSum /= nInputLength;

return dSum;

}


function main(nMA, nSD, nColorSqueeze, nColorAction) {

//Bollinger Band Variables using 1.4 Standard Deviation
var myStudy1 = upperBB (nMA,nSD);
var myStudy2 = lowerBB (nMA,nSD);
var momStudy1 = ema(10,mom(12));
var macdstudy = new macdHist(12,26,9);

BBlow = myStudy2.getValue(0);
BBhigh = myStudy1.getValue(0);
Mom = momStudy1.getValue(0);
macdvalue = macdstudy.getValue(0);



var BarCntr;

var nRangeFactor = 1.5;



if (getBarState() == BARSTATE_NEWBAR)

BarCntr += 1;



if (BarCntr < nMA) {

return;

} else {

var dKeltnerBasis= call("/Library/KeltnerEMA.efs", nMA);
var dATR = ATR(nMA);
KClow = (dKeltnerBasis - (nRangeFactor * dATR));
KChigh = (dKeltnerBasis + (nRangeFactor * dATR));
}
//Logic to create red or blue squeeze signal
if ((BBhigh <= KChigh) || (BBlow >= KClow)) {
drawShapeRelative(0,0,Shape.CIRCLE,null,nColorSqueeze,Shape.TOP);
}
if ((BBhigh > KChigh) || (BBlow < KClow)) {
drawShapeRelative(0,0,Shape.CIRCLE,null,nColorAction,Shape.TOP);
}



if (Mom > 0) {
setBarFgColor(Color.blue);
}
else {
setBarFgColor(Color.red);
}

drawTextPixel( 1, 93, "Squeeze ", Color.black, null, Text.RELATIVETOLEFT | Text.RELATIVETOBOTTOM | Text.BOLD, "Arial",10 );

return ((Mom+macdvalue)/2);

}

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

User avatar
watzdorf
rank: 50+ posts
rank: 50+ posts
Posts: 76
Joined: Thu May 18, 2006 6:46 am
Reputation: 0
Location: Basel, Switzerland
Real name: Alex Watzdorf
Gender: Male

Postby watzdorf » Sat Sep 23, 2006 4:07 pm

TxTrader,
what is this indicator doing? How does it work?
Thank you

Alex

zeller4
rank: 150+ posts
rank: 150+ posts
Posts: 152
Joined: Sat Jul 29, 2006 9:16 pm
Reputation: 0
Location: Geneva, FL
Gender: None specified

Postby zeller4 » Sat Sep 23, 2006 4:21 pm

TxTrader or anybody who may know,
Do you know how to create the darker shading on the backing off side of the histogram bars? Also, you talked about a black dot but I haven't seen one. Do you have a screenshot where one occured so I may reproduce the signal? I'm using AB - what symbol(s) are you using?
Kirk

Alex,
go to TTM (Trade the Markets) or search for TTM or squeeze. TRO had a link I'm trying to find where Hubert (from TTM) explains it. If I can find I will post.

User avatar
watzdorf
rank: 50+ posts
rank: 50+ posts
Posts: 76
Joined: Thu May 18, 2006 6:46 am
Reputation: 0
Location: Basel, Switzerland
Real name: Alex Watzdorf
Gender: Male

Postby watzdorf » Sat Sep 23, 2006 10:10 pm

Thank you Zeller4, found it :)

TxTrader
rank: <50 posts
rank: <50 posts
Posts: 4
Joined: Fri Sep 15, 2006 9:35 pm
Reputation: 0
Gender: Male

Postby TxTrader » Sat Sep 23, 2006 11:31 pm

Screenshot of FP squeeze.
Using code that was posted, I am not able to get any black dots either? So something is different somewhere.



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

zeller4
rank: 150+ posts
rank: 150+ posts
Posts: 152
Joined: Sat Jul 29, 2006 9:16 pm
Reputation: 0
Location: Geneva, FL
Gender: None specified

Postby zeller4 » Sun Sep 24, 2006 1:44 am

I know the Tradestation forum (not necessarily on Kreslik) had a revised squeeze version with an extra dot but I haven't seen in e-signal. Thanks for the screenshot. Was FPsqueeze on the esignal forum? (if you can say where you got or if you coded it?) FWIW, I'm testing with Bollinger and Keltner bands. I think I understand the setup for when you enter long but not when a short position is setup. If anyone knows, please reply or post a screenshot with entry notes. Thanks in advance.
Kirk

TxTrader
rank: <50 posts
rank: <50 posts
Posts: 4
Joined: Fri Sep 15, 2006 9:35 pm
Reputation: 0
Gender: Male

Postby TxTrader » Sun Sep 24, 2006 3:34 am

zeller,

I think the black dot is a preliminary signal, like one band/upper or lower of BB has broken out of Keltner channels, then the full signal is when both break out. Just an idea.

On the short/long position, this only a momentum play, so therefore if the histogram is red then sell, blue then buy. Or you can use another indicator that you are comfortabel with that tends to show market direction.

TRO has been gracious enough to supply plenty! Thanks TRO.

Good trading,

oh, this code is in the Esignal database under the Forex group and at Forexproject.com.

User avatar
Tyler19
rank: <50 posts
rank: <50 posts
Posts: 39
Joined: Mon Feb 05, 2007 5:24 pm
Reputation: 0
Location: Burke, VA
Gender: Male
Contact:

Postby Tyler19 » Sat Feb 17, 2007 11:03 am

If your using Esignal with the squeeze code. Then the dots are different colors. RED dot means wait signal is coming. first Green dot after the red dot means take position in direction of histogram. The dots are located in a line between the positive and negative histogram.

Hope that helps.

User avatar
Patch
rank: 500+ posts
rank: 500+ posts
Posts: 941
Joined: Sat Jan 06, 2007 6:13 pm
Reputation: 0
Location: Virginia
Real name: Jeff
Gender: Male
Contact:

Postby Patch » Sat Feb 17, 2007 12:26 pm

Hi Tyler19

Could you post a chart for guys like me that don't have Esignal ao I can see what you are talking about.

Thanks
Jeff in VA
ENOUGH being a Yalie for me Back to the Sea. "What i can lose, i can win" "YES YOU CAN" - dragon33 -"Pick one method and one pair and stick with them until you master it. "The choice is yours - success or failure." TRO

User avatar
Tyler19
rank: <50 posts
rank: <50 posts
Posts: 39
Joined: Mon Feb 05, 2007 5:24 pm
Reputation: 0
Location: Burke, VA
Gender: Male
Contact:

Postby Tyler19 » Sat Feb 17, 2007 4:44 pm

Hey Jeff, I'm in Burke. How are you liking the Ice?
Attachments
TheSqueeze.png
TheSqueeze.png (193.02 KiB) Viewed 1280 times

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


Return to “eSignal indicators”