PureBytes Links
Trading Reference Links
|
Chris,
The original Greg Woods version (at least this one)
works well in TS6 for a manual fork drawer.
Text and .eld attached.
Clyde
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Clyde Lee Chairman/CEO (Home of SwingMachine)
SYTECH Corporation email:clydelee@xxxxxxxxxxxxxxxxxxx
7910 Westglen, Suite 105 Office: (713) 783-9540
Houston, TX 77063 Fax: (713) 783-1092
Details at: www.theswingmachine.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
----- Original Message -----
From: "chrischeatham" <nchrisc@xxxxxxxxxx>
To: <realtraders@xxxxxxxxxxxxxxx>
Sent: Saturday, September 28, 2002 4:31 PM
Subject: [RT] TS6 pitchfork tool
> I recently tried TS6, and so far like it. Still no drawing tool for
> pitchforks though. TS has a discussion forum where users can vote on
> new features they would like; I added pitchforks to the list. Any
> interested TS users out there I would encourage you to vote. Who
> know...maybe someday they will actually add it. This is the link for
> the discussion topic:
>
> https://www.tradestationworld.com/discussions/topic.asp?TOPIC_ID=2326
>
> Thanks,
> Chris
>
>
>
> To unsubscribe from this group, send an email to:
> realtraders-unsubscribe@xxxxxxxxxxxxxxx
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
------------------------ Yahoo! Groups Sponsor ---------------------~-->
4 DVDs Free +s&p Join Now
http://us.click.yahoo.com/pt6YBB/NXiEAA/MVfIAA/zMEolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
realtraders-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
input: ABACline(true), Median(false), TL_Thick(1);
{ ======================================
This is my implementation of some aspects of Andrews Pitchforks. You are welcome
to use this code freely. You may redistribute it provided you include this comment
block, plus a description of any changes you make.
If you extend it, or adapt it to other uses, I'd appreciate a look at what you've
done. Thanks.
Gregory Wood
SwissFranc@xxxxxxxxxxxxxxxx
12/18/96 v1.0 - Initial distribution
01/08/96 v1.1 - Added median lines
01/15/96 v1.2 - Added TL_Thick, user-customizable colors (see "SET COLORS HERE")
01/16/96 v1.3 - Removed projections to make room for up to 7 pitchforks
01/23/01 v1.3a- Fixed search algorithm -- would miss at times.
Drew missing Bar and got rid of extra length on one projection.
Made it work on upper or lower case. Clyde Lee
03/09/01 v1.3b- Add Option to not plot AB and AC Lines.
========================================}
{
SETUP
Set Plot1 and Plot2 to be large points.
Note that the trendlines use the default trendline settings
USAGE
Use the text tool to label swing high/lows with "A", "B" and "C", then refresh
the indicator (clicking "Status" twice causes the indicator to recalculate).
Be sure to put the label above the bar's high for a swing high, and below the
low for a swing low.
You can display other groups of points by using labels "Ax", "Bx" and "Cx",
where 'x' is 1, 2, or 3, e.g. "A3", "B3", "C3".
Note that you can use the pointer tool to move the points anytime.
Then to view the new Pitchfork, refresh the indicator.
Use Median to add median lines.
Set MyColor (below) to be the colors for each Pitchfork
}
if currentbar = 1 then begin { initialize control arrays }
array:abc[3](""); { The basic point labels }
abc[0] = "A";
abc[1] = "B";
abc[2] = "C";
array:nums[7](""); { The way to distinguish one series of points from another, A-B-C, A1-B1-C1, etc }
nums[0] = "";
nums[1] = "1";
nums[2] = "2";
nums[3] = "3";
nums[4] = "4";
nums[5] = "5";
nums[6] = "6";
var: inums(7);
array: MyColor[7](0);
MyColor[0] = tool_blue; { <=========== SET COLORS HERE }
MyColor[1] = tool_red;
MyColor[2] = tool_yellow;
MyColor[3] = tool_cyan;
MyColor[4] = tool_green;
MyColor[5] = tool_white;
MyColor[6] = tool_magenta;
end;
array:dd[3,7](0),tt[3,7](0),vv[3,7](0),bb[3,7](0),hh[3,7](0);
array:fb[7,4](0),fv[7,4](0);
var: tft(0), fdd(0), fvv(0), ptt(0), pdd(0), pvv(0), fbb(0), pbb(0), pvv2(0);
var: fbbd(0),fvvd(0),pvvd(0);
var: ii(0), jj(0), mm(0);
var: handl(0), handlA(0), handlB(0), handlC(0), handlB1(0), handlC1(0), handlB2(0), handlC2(0);
var: ss("");
var: y1(0), y2(0);
if currentbar = 1 then begin { examine all the text strings and save some info about the ones we recognize }
handl = text_getfirst(2);
while handl >= 0 begin
ss = text_getstring(handl);
ss = UpperStr(ss);
for ii = 0 to inums - 1 begin
for jj = 0 to 2 begin { look for well-formed strings }
if ss = abc[jj] + nums[ii] then begin { save the item's date, time, value and handle }
tt[jj,ii] = text_gettime(handl);
dd[jj,ii] = text_getdate(handl);
vv[jj,ii] = text_getvalue(handl);
hh[jj,ii] = handl;
end;
end;
end;
handl = text_getnext(handl,2); { IMPORTANT -- infinite loop if this is missing! }
end;
end;
for ii = 0 to inums - 1 begin { check each series... }
for jj = 0 to 2 begin { check each point }
if time = tt[jj,ii] and date = dd[jj,ii] then begin { we've found a selected point }
bb[jj,ii] = currentbar; { remember where we found it }
if vv[jj,ii] > c then begin { move the label above the bar and center it }
vv[jj,ii] = h;
Text_SetLocation(hh[jj,ii],text_GetDate(hh[jj,ii]),text_GetTime(hh[jj,ii]),h);
Text_SetStyle(hh[jj,ii],2,1);
end
else begin { move the label below the bar and center it }
vv[jj,ii] = l;
Text_SetLocation(hh[jj,ii],text_GetDate(hh[jj,ii]),text_GetTime(hh[jj,ii]),l);
Text_SetStyle(hh[jj,ii],2,0);
end;
plot1(vv[jj,ii],"Selection"); { show the user which point we used for the calculations }
if jj = 2 then begin { we're at the third point, generally the Cx }
If ABACline then begin
handl = TL_New(dd[0,ii],tt[0,ii],vv[0,ii],dd[1,ii],tt[1,ii],vv[1,ii]);
TL_SetExtLeft(handl,false);
TL_SetExtRight(handl,false);
TL_SetColor(handl,MyColor[ii]);
TL_SetSize (handl,TL_Thick+1);
handl = TL_New(dd[0,ii],tt[0,ii],vv[0,ii],dd[2,ii],tt[2,ii],vv[2,ii]);
TL_SetExtLeft(handl,false);
TL_SetExtRight(handl,false);
TL_SetColor(handl,MyColor[ii]);
TL_SetSize (handl,TL_Thick+1);
End;
value99=TL_New(dd[1,ii],tt[1,ii],vv[1,ii],dd[2,ii],tt[2,ii],vv[2,ii]);
TL_SetExtLeft(Value99,false);
TL_SetExtRight(Value99,false);
TL_SetColor(Value99,MyColor[ii]);
TL_SetSize (Value99, TL_Thick+1);
fbb = (bb[1,ii] + bb[2,ii])*0.5;
fvv = (vv[1,ii] + vv[2,ii])*0.5;
pvv = TLValue(vv[0,ii],bb[0,ii],fvv,fbb,currentbar);
{DRAW CENTERLINE}
handlA = TL_New(dd[0,ii],tt[0,ii],vv[0,ii],date,time,pvv);
TL_SetExtRight(handlA,TRUE);
TL_SetColor(handlA,MyColor[ii]);
TL_SetSize (handlA, TL_Thick);
{ show the related lower trident channel line }
pvv = TLValue(vv[1,ii],bb[1,ii],fvv+vv[1,ii]-vv[0,ii],fbb+bb[1,ii]-bb[0,ii],currentbar);
handlB = TL_New(dd[1,ii],tt[1,ii],vv[1,ii],date,time,pvv);
TL_SetExtRight(handlB,true);
TL_SetColor(handlB, MyColor[ii]);
TL_SetSize(handlB, TL_Thick);
if Median then begin { save for later }
handlB1 = TL_New(dd[1,ii],tt[1,ii],vv[1,ii],date,time,pvv);
TL_SetExtRight(handlB1,true);
TL_SetColor(handlB1, MyColor[ii]);
TL_SetSize(handlB1, TL_Thick);
handlB2 = TL_New(dd[1,ii],tt[1,ii],vv[1,ii],date,time,pvv);
TL_SetExtRight(handlB2,true);
TL_SetColor(handlB2, MyColor[ii]);
TL_SetSize(handlB2, TL_Thick);
end;
{ show the related upper trident channel line }
pvv = TLValue(vv[0,ii]-(fvv-vv[2,ii]), bb[0,ii]+(bb[2,ii]-fbb), vv[2,ii], bb[2,ii],bb[1,ii]);
handlC = TL_New(dd[1,ii],tt[1,ii],pvv,date,time,vv[2,ii]);
TL_SetExtRight(handlC,true);
TL_SetColor(handlC, MyColor[ii]);
TL_SetSize(handlC, TL_Thick);
if Median then begin { save for later }
handlC1 = TL_New(dd[1,ii],tt[1,ii],pvv,date,time,vv[2,ii]);
TL_SetExtRight(handlC1,true);
TL_SetColor(handlC1, MyColor[ii]);
TL_SetSize(handlC1, TL_Thick);
handlC2 = TL_New(dd[1,ii],tt[1,ii],pvv,date,time,vv[2,ii]);
TL_SetExtRight(handlC2,true);
TL_SetColor(handlC2, MyColor[ii]);
TL_SetSize(handlC2, TL_Thick);
end;
if Median then begin { sorry these are hard-coded... you know what they say about quick + dirty! }
{ show the median lines }
y1 = TL_GetValue(handlB, dd[1,ii], tt[1,ii]);
y2 = TL_GetValue(handlA, dd[1,ii], tt[1,ii]);
TL_SetBegin(handlB1, dd[1,ii], tt[1,ii], (y1 + y2) / 2);
y1 = TL_GetValue(handlB, dd[2,ii], tt[2,ii]);
y2 = TL_GetValue(handlA, dd[2,ii], tt[2,ii]);
TL_SetEnd(handlB1, dd[2,ii], tt[2,ii], (y1 + y2) / 2);
y1 = TL_GetValue(handlB, dd[1,ii], tt[1,ii]);
y2 = TL_GetValue(handlA, dd[1,ii], tt[1,ii]);
TL_SetBegin(handlB2, dd[1,ii], tt[1,ii], y1 + y1- (y1 + y2) / 2);
y1 = TL_GetValue(handlB, dd[2,ii], tt[2,ii]);
y2 = TL_GetValue(handlA, dd[2,ii], tt[2,ii]);
TL_SetEnd(handlB2, dd[2,ii], tt[2,ii], y1 + y1 - (y1 + y2) / 2);
y1 = TL_GetValue(handlC, dd[1,ii], tt[1,ii]);
y2 = TL_GetValue(handlA, dd[1,ii], tt[1,ii]);
TL_SetBegin(handlC1, dd[1,ii], tt[1,ii], (y1 + y2) / 2);
y1 = TL_GetValue(handlC, dd[2,ii], tt[2,ii]);
y2 = TL_GetValue(handlA, dd[2,ii], tt[2,ii]);
TL_SetEnd(handlC1, dd[2,ii], tt[2,ii], (y1 + y2) / 2);
y1 = TL_GetValue(handlC, dd[1,ii], tt[1,ii]);
y2 = TL_GetValue(handlA, dd[1,ii], tt[1,ii]);
TL_SetBegin(handlC2, dd[1,ii], tt[1,ii], y1 + y1 - (y1 + y2) / 2);
y1 = TL_GetValue(handlC, dd[2,ii], tt[2,ii]);
y2 = TL_GetValue(handlA, dd[2,ii], tt[2,ii]);
TL_SetEnd(handlC2, dd[2,ii], tt[2,ii], y1 + y1 - (y1 + y2) / 2);
end;
end;
end;
end;
end;
Attachment:
Description: "ANDREWSPITCHFORK_GW.ELD"
|