Hi everyone! I have some TradeStation code that I need converted to ThinkScript.
Code:
[LegacyColorValue = true];
Inputs: time1(0910), time2(0915)
time3(0920), time4(1215), time5(1220)
time6(1225);
if time =time1 or time = time2 or time = time3 then
begin
Plot(high, "5 min chart", yellow);
Plot2(low, "5 min chart,", yellow);
end;
if time= time4 or time = time5 or time =
time6 then
begin
Plot1(high, "5 min chart", red);
Plot2(low, "5 min chart", red);
end;
THANK YOU IN ADVANCE!!
input begin = 1010;
input arrowsize = 5;
plot firstbar = secondsFromTime(begin)==0;
def count = if gettime() crosses above regularTradingstart(getyyyYMMDD())
then 1
else if !firstbar
then count[1] + 1
else count[1];
DefineGlobalColor("Time", Color.YELLOW);
firstbar.setpaintingStrategy(paintingStrategy.BOOLEAN_ARROW_UP);
firstbar.setlineWeight(arrowsize);
firstbar.setdefaultColor(globalColor("Time"));
plot xcount = if firstbar then count + 1 else double.nan;
xcount.setpaintingStrategy(paintingStrategy.VALUES_ABOVE);
xcount.setdefaultColor(globalColor("Time"));
input begin2 = 1015;
input arrowsize2 = 5;
plot secondbar = secondsFromTime(begin2)==0;
def count2 = if gettime() crosses above regularTradingstart(getyyyYMMDD())
then 1
else if !secondbar
then count2[1] + 1
else count2[1];
DefineGlobalColor("Time", Color.YELLOW);
secondbar.setpaintingStrategy(paintingStrategy.BOOLEAN_ARROW_UP);
secondbar.setlineWeight(arrowsize2);
secondbar.setdefaultColor(globalColor("Time"));
plot xcount2 = if secondbar then count2 + 1 else double.nan;
xcount2.setpaintingStrategy(paintingStrategy.VALUES_ABOVE);
xcount2.setdefaultColor(globalColor("Time"));
input begin3 = 1020;
input arrowsize3 = 5;
plot thirdbar = secondsFromTime(begin3)==0;
def count3 = if gettime() crosses above regularTradingstart(getyyyYMMDD())
then 1
else if !thirdbar
then count3[1] + 1
else count3[1];
DefineGlobalColor("Time", Color.YELLOW);
thirdbar.setpaintingStrategy(paintingStrategy.BOOLEAN_ARROW_UP);
thirdbar.setlineWeight(arrowsize3);
thirdbar.setdefaultColor(globalColor("Time"));
plot xcount3 = if thirdbar then count + 1 else double.nan;
xcount3.setpaintingStrategy(paintingStrategy.VALUES_ABOVE);
xcount3.setdefaultColor(globalColor("Time"));