chicago
Experience: Intermediate
Platform: sierra charts, ninjatrader
Trading: emini
Posts: 9 since Jul 2014
Thanks Given: 12
Thanks Received: 0
|
I am requesting conversion of thinkorswim to tradestation conversion for the following code. Pic of tos is included. Thanks
input ArrowsOn = yes;
input TracerLinesOn = no;
input PriceColorOn = Yes;
#AddLabel(PriceColorOn, "PPS PriceColorOn");
input ShowTodayOnly = no;
input ShowExtraDays = 0;
def Today =
if !ShowTodayOnly then 1 else
if GetDay() + ShowExtraDays >= GetLastDay() && GetYear() == GetLastYear() then 1 else 0;
input ArrowSpace = .233;
def space = Average(high - low) * ArrowSpace;
#Input AlertsOn = no;
#AddChartLabel(AlertsOn, "PPS AlertsOn");
def BuyIt = PPS().buysignal;
def SellIt = PPS().sellsignal;
plot ppsBuy = if !Today or !ArrowsOn then Double.NaN else BuyIt - space;
ppsBuy.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
ppsBuy.SetDefaultColor(Color.cyan);
ppsBuy.SetLineWeight(2);
Alert(ppsBuy, “PPS Buy Signal”, Alert.BAR, Sound.Ring);
plot ppsSell = if !Today or !ArrowsOn then Double.NaN else SellIt + space;
ppsSell.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
ppsSell.SetDefaultColor(Color.red);
ppsSell.SetLineWeight(2);
Alert(ppsSell, “PPS Sell Signal”, Alert.BAR, Sound.Ring);
#AddLabel(ArrowsOn, "WhiteArrows=PPS", Color.WHITE);
rec PriceAtBuy = if barNumber() == 1 then close else if !IsNaN(BuyIt[0]) then open[0] else PriceAtBuy[1];
rec PriceAtSell = if barNumber() == 1 then close else if !IsNaN(SellIt[0]) then open[0] else PriceAtSell[1];
rec trigger = if PriceAtBuy <> PriceAtBuy[1] then -1 else if PriceAtSell <> PriceAtSell[1] then 1 else trigger[1];
plot BuyPrice = if TracerLinesOn && trigger == -1 then PriceAtBuy else Double.NaN;
BuyPrice.SetDefaultColor(Color.GREEN);
BuyPrice.SetPaintingStrategy(PaintingStrategy.POINTS);
plot SellPrice = if TracerLinesOn && trigger == 1 then PriceAtSell else Double.NaN;
SellPrice.SetDefaultColor(Color.RED);
SellPrice.SetPaintingStrategy(PaintingStrategy.POINTS);
AssignPriceColor(if !PriceColorOn then Color.CURRENT else if trigger == 1 then Color.RED else Color.GREEN);
declare upper;
input ShowMA_Curves = Yes;
input BlenderKing_Short = 4;
input BlenderKing_Long = 7;
def SMA_4 = Average(data = hlc3, length = BlenderKing_Short);
plot SMA_4plot = if Today && ShowMA_Curves then SMA_4 else Double.NaN;
SMA_4plot.SetDefaultColor(Color.YELLOW);
def SMA_7 = Average(data = close, length = BlenderKing_Long);
plot SMA_7plot = if Today && ShowMA_Curves then SMA_7 else Double.NaN;
SMA_7plot.SetDefaultColor(Color.CYAN);
AddCloud(SMA_4plot, SMA_7plot);
[img]https://s3.postimg.org/p65iftu1v/pic.jpg[/img]
|