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

RE: Code Problem



PureBytes Links

Trading Reference Links

Yes, that was simple enough and it seems to be working properly now. Thanks
for helping. I'm fair at guessing at what I need sometimes, but I'm no
programmer.

B.

-----Original Message-----
From: Bob Fulks [mailto:bfulks@xxxxxxxxxxxx]
Sent: Thursday, July 18, 2002 4:40 PM
To: Brent
Cc: Omega List
Subject: Re: Code Problem


>This code is supposed to calculate the number of minutes in a tick bar and
>put it on the screen. It works most of the time but not always. Your help
>suggestions are appreciated.


NEVER expect TradeStation to parse complex expressions like a real
programming language...

You have to do everything in baby steps...

The term AV(mins) looks like a function call so I hope it is a function in
your system.

Bob Fulks


Input: COLOR(Tool_White), PP(H),abv(1);

  Vars: Min1(0), Mins(0), newtext(0), Sbar(0);
  Min1 = TimeToMinutes(Time);
  Mins = Min1 - Min1[1];

Value1 = Iff(Mins>0 and time>Sess1StartTime, Mins, MinInDay-AV(mins));

newtext = text_new(date,time,PP,numtostr(Value1,0));
Value2 = text_setstyle(newtext,2,abv);

{changes numbers to red for white charts.}
if GetBackGroundColor=Tool_White
   then Value4=Text_SetColor(newtext, Tool_Red)
   else Value4=Text_SetColor(newtext, Color);

if false then plot1(C,"");

B.