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

Re: Click Debugger



PureBytes Links

Trading Reference Links

What you are asking for is some more modern way of debugging than the mid 1950's version built into TradeStation... (The feature list for TradeStation 7 mentioned this as I recall.)

What I sometimes do is something like the following:

---------

Input: SDate(1020315), Days(5), ...;

Vars: EDate(JulianToDate(DateToJulian(SDate) + Days)), DeBugOn(FALSE);

DeBugOn = Date >= SDate and Date <= EDate;

if DeBugOn then Print(Date:7:0, Time:5:0, " 01", <Variable1>, <Variable2>, ...);

<more code>

if DeBugOn then Print(Date:7:0, Time:5:0, " 02", <Variable1>, <Variable2>, ...);

<more code>

if DeBugOn then Print(Date:7:0, Time:5:0, " 03", <Variable1>, <Variable2>, ...);

<more code>

----------

Anyway, you get the idea. Not very elegant but it works.

Bob Fulks




At 11:19 PM -0500 1/15/03, Gene Pope wrote:

>Thanks Bob, I do use that method all the time. Let me restate my situation
>better.
>
>As my code gets ever more complex, with functions calling functions and
>virtual bars and array values and on and on... I'm trying to use an "input"
>of some kind to "pause" the execution wherever I want, so I can better
>isolate sub-loops etc. within the execution of a particular bar or set of
>bars. Then I can use normal print statement type debuggers, without dumping
>the entire file out.
>
>I had merely recalled a question raised by someone who wanted to input
>values by clicking on particular bars on a chart. And I thought that with
>this method of inputting, if it could perhaps "mark" a bar or something
>similar, could better isolate the sections I want to examine.
>
>Then again, perhaps I'm asking too much from TS... or I'm making a mountain
>out of a molehill?
>
>Best regards,
>
>Gene Pope
>
>
>----- Original Message -----
>From: "Bob Fulks" <bfulks@xxxxxxxxxxxx>
>To: "Gene Pope" <gene@xxxxxxxxxxxxx>; <omega-list@xxxxxxxxxx>
>Sent: Wednesday, January 15, 2003 5:27 PM
>Subject: Re: Click Debugger
>
>
>> At 2:22 PM -0500 1/15/03, Gene Pope wrote:
>>
>> >I was wondering if anyone had some experience creating code in TS that
>waits
>> >for the user to click anywhere on the chart. I'm not intending to use
>this
>> >as input to anything, but rather as a de-bugging tool to allow me to
>"step"
>> >through various program loops that I set up for every "click".
>> >
>> >I was thinking about this and remembered that there are examples of code
>> >that allow inputs by typing letters on a chart, and I dimly remember
>someone
>> >talking about clicking on the screen for input.
>> >
>> >Has anyone worked this out before? Or are there other ways to manually
>step
>> >through TS code?
>> >
>> >Many thanks for allowing me not to have to reinvent the wheel... ;~)
>>
>>
>> You can easily use the "Expert Commentary" function to display the
>> values of all important variables on any bar.
>>
>> Is that what you mean?
>>
>> Bob Fulks
>>
>>