[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Human factor friendly arcs or dot-line cycle indicators



PureBytes Links

Trading Reference Links

Like usual, Tradestation indicators have no color aids in indicators.
But where you can fix this problem in indicators, it becomes much harder
with drawing buttons
like Standard Cycle button.

I've got a preliminary starter ela that bases (4 cycles) 'Point(lines)' on
'even-odd' cycle methodology below.
But the problem is projecting w/e's, holidays, and half days into
projections.
Counting bars would have its Max lookback limits as well but would be
simpler; and extrapolating cycles
backwards and forwards would be an issue.

If anyone would have any suggestions, I'd appreciate it. I'm either real
close on this method or
real off-base on concepts. It will probably be a hybrid solution somehow,
but I'd prefer close-proximity cycle colors
(as in my starter ela) over the mono-color spaced-out arc shapes (in TS2K)
for recognizing short term critical decision zones.

Note: all cycles are supposed to start off green-red sequence and are 50%
length of next higher level.
And some Inputs below are irrelevant for later planning: on/off plots and
bars per day cycles.


Thanks,
Phil


****************************************************************************
****************************************************************************

Inputs: CenterDate(050125), DaysperPeriod(40),BarsperDay(7),LeastBarPer(7),
	SpaceLines(.5),FromOrigin(0),Plotone(1),Plottwo(1),Plotthree(1),Plotfour(1)
,
	Upcol(green),Dwncol(red);

if currentbar> daysperperiod 	then begin

{1- get Delta Days per each period}
if date>= centerdate then
value31=date-centerdate    {total days away}
else
if date < centerdate then
value31= - date+centerdate;    {total days away}

if dayofweek(date) <>0 and dayofweek(date)<>6 then begin
value1=daysperperiod;
value32=mod(value31,(round(value1,0))); {day in cycle}

{2- designate Periods per assigned group one to 4}
value2=2 ;    {largest period bar split level}
value3=4; {2nd split level}
value4=8; {3rd split level}
value5=16; {4th split level}

{3- determine Cycle/Period}
value22=value1/value2;  {largest period bar split level}
value23=value1/value3; {2nd split level}
value24=value1/value4; {3rd split level}
value25=value1/value5; {4th split level}

{4- Determine Delta Days/Cycle/Period = Periods}
value12=value32/value22;  {largest period bar split level}
value13=value32/value23; {2nd split level}
value14=value32/value24; {3rd split level}
value15=value32/value25; {4th split level}

{5- Truncate Delta Days/Cycle/Period = Periods}
value32=value12 - mod(value12,1);  {largest period bar split level}
value33=value13- mod(value13,1);  {2nd split level}
value34=value14- mod(value14,1);  {3rd split level}
value35=value15- mod(value15,1);  {4th split level}

{6- Mod2 Truncated Delta Days/Cycle/Period = Periods for 1, odd = red, 2,
even = green}
value42= mod(value32,2);  {largest period bar split level}
value43= mod(value33,2);  {2nd split level}
value44= mod(value34,2);  {3rd split level}
value45= mod(value35,2);  {4th split level}

if value42 =1 then setplotcolor(1,red) else setplotcolor(1, green);
if value43 =1 then setplotcolor(2,red) else setplotcolor(2, green);
if value44 =1 then setplotcolor(3,red) else setplotcolor(3, green);
if value45 =1 then setplotcolor(4,red) else setplotcolor(4, green);

plot1(10,"Period1");
plot2(20,"Period2");
plot3(30,"Period3");
plot4(40,"Period4");
end;
end;