NexusFi: Find Your Edge


Home Menu

 





Thinkorswim to tradestation conversion


Discussion in TradeStation

Updated
    1. trending_up 1,735 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 0 posts
    2. attach_file 0 attachments




 
Search this Thread

Thinkorswim to tradestation conversion

  #1 (permalink)
 renkonovice 
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]

Started this thread Reply With Quote




Last Updated on July 21, 2017


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts