does anyone know if there is a ready made formula in here for the indicators offered by trade the market. I am looking for a squeeze indicator, and the TTM trend indicator.
Announcement
Collapse
No announcement yet.
trade the markets
Collapse
X
-
TTM Trend
Can someone convert this to eSignal?
if (Bar High+Bar Low)/2<(((Bar High[1]+Bar Low[1])/2) + ((Bar High[2]+Bar Low[2])/2) + ((Bar High[3]+Bar Low[3])/2) + ((Bar High[4]+Bar Low[4])/2) + ((Bar High[5]+Bar Low[5])/2) + ((Bar High[6]+Bar Low[6])/2))/6 set color to Red
if (Bar High+Bar Low)/2>(((Bar High[1]+Bar Low[1])/2) + ((Bar High[2]+Bar Low[2])/2) + ((Bar High[3]+Bar Low[3])/2) + ((Bar High[4]+Bar Low[4])/2) + ((Bar High[5]+Bar Low[5])/2) + ((Bar High[6]+Bar Low[6])/2))/6 set color to Blue
if (Bar High+Bar Low)/2=(((Bar High[1]+Bar Low[1])/2) + ((Bar High[2]+Bar Low[2])/2) + ((Bar High[3]+Bar Low[3])/2) + ((Bar High[4]+Bar Low[4])/2) + ((Bar High[5]+Bar Low[5])/2) + ((Bar High[6]+Bar Low[6])/2))/6 set color to Yellow
Comment
-
Nicole
The following section of code which is used in all three of your conditions ie
PHP Code:((Bar High[1]+Bar Low[1])/2) + ((Bar High[2]+Bar Low[2])/2) + ((Bar High[3]+Bar Low[3])/2) +
((Bar High[4]+Bar Low[4])/2) + ((Bar High[5]+Bar Low[5])/2) + ((Bar High[6]+Bar Low[6])/2))
PHP Code:sma(6,hl2(),-1);
So your snippet of code converted to efs equivalent would be written as follows
PHP Code:var HiLo = (high(0)+low(0))/2;
var avgHiLo = sma(6,hl2(),-1);
if((HiLo < avgHiLo) setPriceBarColor(Color.red);
else if(HiLo > avgHiLo) setPriceBarColor(Color.blue);
else setPriceBarColor(Color.yellow);//no need to specify the last condition because there can
//be only three states ie greater than, lesser than or equal
Alex
Originally posted by Nicole
Can someone convert this to eSignal?
if (Bar High+Bar Low)/2<(((Bar High[1]+Bar Low[1])/2) + ((Bar High[2]+Bar Low[2])/2) + ((Bar High[3]+Bar Low[3])/2) + ((Bar High[4]+Bar Low[4])/2) + ((Bar High[5]+Bar Low[5])/2) + ((Bar High[6]+Bar Low[6])/2))/6 set color to Red
if (Bar High+Bar Low)/2>(((Bar High[1]+Bar Low[1])/2) + ((Bar High[2]+Bar Low[2])/2) + ((Bar High[3]+Bar Low[3])/2) + ((Bar High[4]+Bar Low[4])/2) + ((Bar High[5]+Bar Low[5])/2) + ((Bar High[6]+Bar Low[6])/2))/6 set color to Blue
if (Bar High+Bar Low)/2=(((Bar High[1]+Bar Low[1])/2) + ((Bar High[2]+Bar Low[2])/2) + ((Bar High[3]+Bar Low[3])/2) + ((Bar High[4]+Bar Low[4])/2) + ((Bar High[5]+Bar Low[5])/2) + ((Bar High[6]+Bar Low[6])/2))/6 set color to Yellow
Comment
Comment