Thinkscript to Easy Language - TradeStation | futures io social day trading
futures io futures trading


Thinkscript to Easy Language
Updated: Views / Replies:2,743 / 4
Created: by jflippin Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Thinkscript to Easy Language

  #1 (permalink)
Trading Apprentice
Omaha, NE
 
Futures Experience: Intermediate
Platform: tradestation/tos
Favorite Futures: futures
 
Posts: 3 since Oct 2012
Thanks: 1 given, 0 received

Thinkscript to Easy Language

I'm struggling to learn this code.. Trying to convert my very simple watchlist script into a radar screen function of easy language. This is the code if anyone can help out maybe it will start to click after this I am hoping. Thanks in advance.


def dmiplus = DMI(length = 14)."DI+";
def dmiminus = DMI(length = 14)."DI-";


def isBull = dmiplus > dmiminus and dmiplus[1] <= dmiminus[1];
def isBear = dmiplus < dmiminus and dmiplus[1] >= dmiminus[1];
plot PlotBull = if isBull then 1 else if isBear then -1 else 0;
PlotBull.assignValueColor(if isBull then color.UPTICK else if isBear then color.DOWNTICK else CreateColor(237, 237, 237));
assignBackgroundColor(if isBull then color.UPTICK else if isBear then color.DOWNTICK else CreateColor(237, 237, 237));

Reply With Quote
 
  #2 (permalink)
Elite Member
Atlanta, Georgia
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: DDT
Favorite Futures: ZN, ZB
 
cbritton's Avatar
 
Posts: 224 since Mar 2010
Thanks: 152 given, 237 received

Here's a simple indicator based on your tos code. I don't have experience with radarscreen so you might need to add a few function calls to change the cell colors, etc. If you really need it, I can try. Let me know.


 
Code
vars:
	dmipl(0),
	dmimi(0),
	isBull(false),
	isBear(false);
	
dmipl = dmiplus(14);
dmimi = dmiminus(14);

if dmipl > dmimi and dmipl[1] <= dmimi[1] then isBull = true else isBull = false;
if dmipl < dmimi and dmipl[1] >= dmimi[1] then isBear = true else isBear = false;

value1 = iff (isBull, 1, iff(isBear, -1, 0));

Plot1(value1, "DMI +-");
Plot2(0, "UPTICK");
plot3(0, "DNTICK");
noPlot(2);
noPlot(3);

if isBull then setPlotcolor(1, getPlotColor(2)) 
else if isBear then setPlotcolor(1, getPlotColor(3))
else setPlotcolor(1, rgb(237, 237,237));


Hope this helps,
-C

“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Reply With Quote
The following 2 users say Thank You to cbritton for this post:
 
  #3 (permalink)
Trading Apprentice
Omaha, NE
 
Futures Experience: Intermediate
Platform: tradestation/tos
Favorite Futures: futures
 
Posts: 3 since Oct 2012
Thanks: 1 given, 0 received


Thanks a lot this is great! I certainly appreciate the quick response!

Reply With Quote
 
  #4 (permalink)
Trading Apprentice
Omaha, NE
 
Futures Experience: Intermediate
Platform: tradestation/tos
Favorite Futures: futures
 
Posts: 3 since Oct 2012
Thanks: 1 given, 0 received

I think I am getting close.. It seems to work but what I was hoping for was only indicate for a current crossing otherwise the cell should be white.. Anyway this is what I have. I am struggling with if the cell isn't 1 or -1 I am wanting it to be white or black(just not setting a color if there is no cross). I hope this makes sense. Thanks again

vars:
dmipl(0),
dmimi(0),
isBull(false),
isBear(false),
LongShort("");


dmipl = dmiplus(14);
dmimi = dmiminus(14);

if dmipl > dmimi and dmipl[1] <= dmimi[1] then isBull = true else isBull = false;
if dmipl < dmimi and dmipl[1] >= dmimi[1] then isBear = true else isBear = false;

value1 = iff (isBull, 1, iff(isBear, -1,0));

var:color(0); color = yellow;

if value1 = 1 then begin

Color = Green;
End
Else Begin

Color = red;
End;

If value1 > 0 then begin
LongShort = "Long";
End
else begin
LongShort = "Short" ;
End;

If LongShort = "Short" then Color = red
Else Color = green;

SetPlotBGColor(6, color);
SetPlotColor(6, white);
Plot6(LongShort, "LongShort");

Reply With Quote
 
  #5 (permalink)
Elite Member
Lake wales FL/ USA
 
Futures Experience: Intermediate
Platform: TOS ,Tradestation, Sierra
Favorite Futures: Futures
 
Posts: 32 since Jul 2013
Thanks: 7 given, 2 received

thinkscript converted to easy language...

Im looking for someone who knows how to code that could help me with this. I need this converted from thinkscript to easy language. Any help is much appreciated. Thanks in advance.

# sdi_psarstgy:
#hint:Strategy to evaluate trading parabolic-stop-and-reverse signals http://www.smallDogInvestor.com rev:1.1.0
# author: allen everhart
# date: 16may2014
# revisions:
# 4jun2014-added %win label, corrected reverse price on gaps
input dollarsPerTrade = 10000;
#hint dollarsPerTrade: trades vary in share size in order to keep the invested dollars constant to create a fair comparison to passive strategies. http://www.smallDogInvestor.com rev: 1.1.0
input accelerationFactor = 0.02;
#hint accelerationFactor: controls how steep a parabola is traced by the stop.
input accelerationLimit = 0.2;
#hint accelerationLimit: after the limit is reached the stop moves up in a straight line.

def psar = ParabolicSAR( "acceleration limit" = accelerationLimit, "acceleration factor" = accelerationFactor);
def buySig = close crosses above psar;
def sellSig = close crosses below psar;
def shareSize = round(dollarsPerTrade/psar,0) ;
def buyPrice=#psar;
if open[-1]>psar then open[-1]
else psar;
def sellPrice= #psar;
if open[-1]<psar then open[-1]
else psar;
AddOrder(OrderType.BUY_AUTO, buySig[-1], price = buyPrice, tradeSize=shareSize, name = "buy");
AddOrder(OrderType.SELL_AUTO, sellSig[-1], price = sellPrice, tradeSize=shareSize, name="short");
plot parSAR = psar;
parsar.setPaintingStrategy(paintingStrategy.POINTS);
parSar.setDefaultColor(color.rED);

def longPrice=compoundValue(1,
if !longPrice[1] && buySig[-1] then buyPrice
else if longPrice[1] && sellSig[-1] then 0
else longPrice[1]
,0
);
#plot lp=longPrice;
def shortPrice=compoundValue(1,
if !shortPrice[1] && sellSig[-1] then sellPrice
else if shortPrice[1] && buySig[-1] then 0
else shortPrice[1]
,0
);
#plot sp=shortPrice;

def wincntr= compoundValue(1,
if longPrice[1] && sellSig[-1] && sellPrice>longPrice[1] then wincntr[1]+1
else if shortPrice[1] && buySig[-1] && shortPrice[1]>buyPrice then wincntr[1]+1
else wincntr[1]
,0
);
def winNum=if isnan(wincntr) then winNum[1] else wincntr ;
def losscntr= compoundValue(1,
if longPrice[1] && sellSig[-1] && sellPrice<=longPrice[1] then losscntr[1]+1
else if shortPrice[1] && buySig[-1] && shortPrice[1]<=buyPrice then losscntr[1]+1
else losscntr[1]
,0
);
def lossNum=if isnan(lossCntr) then lossNum[1] else lossCntr ;

addlabel(1,
concat( "win: ",
concat( round( 100*winNum/(winNum+lossNum),1),
concat( "% of ", winNum+lossNum))),

color.BLUE);
#####################

Reply With Quote

Reply



futures io > > > > Thinkscript to Easy Language

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Easy Language code into Thinkscript sboarder13 ThinkOrSwim 20 November 22nd, 2016 01:47 AM
Very simple easy language Help ttsang EasyLanguage Programming 4 March 8th, 2012 02:24 PM
easy language ..not easy... Serger EasyLanguage Programming 4 April 26th, 2011 04:42 PM


All times are GMT -4. The time now is 08:37 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-12 in 0.10 seconds with 19 queries on phoenix via your IP 54.90.207.75