PureBytes Links
Trading Reference Links
|
Greetings,
I'm doing 99.9% of my Tradestation coding in C++ these days and I'm looking
for creative ways to position text on a chart. [basically at this point my
DLL has all of my system code and also tracks entries, exits, positions,
etc and I only use TS as a means of loading data and graphical output --
eventually TS will go away altogether].
At the moment I'm trying to place my entry and exit markers on the
chart. An example is "^3/5" (^ = long entry, 3 = size, 5 = resulting
position size). I'll also need to drop a code in there to identify the signal.
I was just positioning the text vertically at the High for a long and at
the Low for a short. Since it takes some space, I'd like to raise it up
above the surrounding bars.
I considered using FindArray_High() with both positive and negative indexes
to find the high of the 15 bars before and after the bar I'm plotting at.
I can't find any info in the dev kit about what happens when you give an
index into FindArray_XXXX() that is off the end of the array (on either
side). I gave it a test run and I seem to get 0's back -- that's good if I
can trust it. Can I? At the moment it doesn't seem consistant. Anyone
have experience here? Does anyone have any tricks to know where the end of
the array is?
Any other creative thoughts on text positioning?
Another big challenge I've run across is "stacking" text or showmes in a
clean manner. The big problem here is that you have to poisition text
vertically via price and the vertical scale of the chart changes as you
move left and right. One "hack" I've done here in the past was to create a
function that looks at the average range of the last X bars and use a
portion of that as the distance between stacked text.
Dave
david_wieringa@xxxxxxxx
Scottsdale, AZ
|