Pinescript to Thinkscript code - futures io
futures io futures trading



Pinescript to Thinkscript code


Discussion in ThinkOrSwim

Updated by jeisenm
      Top Posters
    1. looks_one ElyG with 2 posts (1 thanks)
    2. looks_two bobwest with 1 posts (1 thanks)
    3. looks_3 jeisenm with 1 posts (0 thanks)
    4. looks_4 alagrande with 1 posts (0 thanks)
    1. trending_up 1,443 views
    2. thumb_up 2 thanks given
    3. group 16 followers
    1. forum 4 replies
    2. attach_file 1 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

 
Search this Thread
 

Pinescript to Thinkscript code

(login for full post details)
  #1 (permalink)
Weston
 
 
Posts: 2 since Feb 2020
Thanks: 1 given, 1 received

I am new in this forum and practicing on demo in Thinkorswim. I found this Pinescript on Tradingview, so I would like to have it on TOS. Here is the Pinescript to be coded in Thinkscript.
Any help I really appreciate.

study(title="Koncorde")
calc_pvi() =>
sval=volume
pvi=(volume > volume[1]) ? nz(pvi[1]) + ((close - close[1])/close[1]) * (na(pvi[1]) ? pvi[1] : sval) : nz(pvi[1])
pvi

calc_nvi() =>
sval=volume
nvi=(volume < volume[1]) ? nz(nvi[1]) + ((close - close[1])/close[1]) * (na(nvi[1]) ? nvi[1] : sval) : nz(nvi[1])
nvi

calc_mfi(length) =>
src=hlc3
upper = sum(volume * (change(src) <= 0 ? 0 : src), length)
lower = sum(volume * (change(src) >= 0 ? 0 : src), length)
rsi(upper, lower)

tprice=ohlc4
lengthEMA = input(255, minval=1)
m=input(15)
pvi = calc_pvi()
pvim = ema(pvi, m)
pvimax = highest(pvim, 90)
pvimin = lowest(pvim, 90)
oscp = (pvi - pvim) * 100/ (pvimax - pvimin)
nvi =calc_nvi()
nvim = ema(nvi, m)
nvimax = highest(nvim, 90)
nvimin = lowest(nvim, 90)
azul = (nvi - nvim) * 100/ (nvimax - nvimin)
xmf = calc_mfi(14)
mult=input(2.0)
basis = sma(tprice, 25)
dev = mult * stdev(tprice, 25)
upper = basis + dev
lower = basis - dev
OB1 = (upper + lower) / 2.0
OB2 = upper - lower
BollOsc = ((tprice - OB1) / OB2 ) * 100
xrsi = rsi(tprice, 14)
calc_stoch(src, length,smoothFastD ) =>
ll = lowest(low, length)
hh = highest(high, length)
k = 100 * (src - ll) / (hh - ll)
sma(k, smoothFastD)

stoc = calc_stoch(tprice, 21, 3)
marron = (xrsi + xmf + BollOsc + (stoc / 3))/2
verde = marron + oscp
media = ema(marron,m)
bandacero= 0

vl=plot(verde, color=#66FF66, style=area, title="verde")// COLOURED(102,255,102) as “verde” , GREEN
ml=plot(marron, color= #FFCC99, style=area, title="marron", transp=0) // COLOURED(255,204,153) as"marron" , BEIGE
al=plot(azul, color=#00FFFF, style=area, title="azul") // COLOURED(0,255,255) as “azul” ,
plot(marron, color= #330000, style=line, linewidth=2, title="lmarron") // COLOURED(51,0,0) as “lmarron” ,
plot(verde, color=#006600, style=line, linewidth=2, title="lineav") // COLOURED(0,102,0) as “lineav” ,
plot(azul, color=#000066, style=line, title="lazul", title="lazul") // COLOURED(0,0,102) as “lazul” ,
plot(media, color=red, title="media", style=line, linewidth=2) // COLOURED(255,0,0) as “media” ,
plot(bandacero, color=black, title="cero") // COLOURED(0,0,0) as "cero"

Reply With Quote

Can you help answer these questions
from other members on futures io?
QDEL
Stocks and ETFs
Thinkscript for scanning in Option Hacker
ThinkOrSwim
3x Fangdango
Traders Hideout
Degiro Negative Balance Advice
Traders Hideout
Trade Summary Error
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on futures io
VWAP for stock index futures trading?
48 thanks
Coronavirus COVID-19
18 thanks
VWAP oscillator for NT8
15 thanks
Battlestations: Show us your trading desks!
12 thanks
Opinion on iron condor strategy
8 thanks
 
(login for full post details)
  #2 (permalink)
Site Moderator
Sarasota FL
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
 
bobwest's Avatar
 
Posts: 5,936 since Jan 2013
Thanks: 45,825 given, 19,914 received


ElyG View Post
I am new in this forum and practicing on demo in Thinkorswim. I found this Pinescript on Tradingview, so I would like to have it on TOS. Here is the Pinescript to be coded in Thinkscript.
Any help I really appreciate.

Hi @ElyG,

To make your request more likely to get some interest, I suggest telling the prospective programmer what the indicator does, and perhaps include a screen shot and some explanation of how you find it useful to your trading.

As it is, you are asking someone to step through the code and try to figure out what in the world it does, and why it would be interesting to have it in TOS. Probably very few (as in, none ) are going to do this.

But if you give someone a reason to think it might be of use, then you have a better chance.

This is not a criticism, just advice from someone who has made a living programming for a long time. People who don't code for a living seem to think that someone who, for instance, knows pinescript would just read what you posted and get it right away. Actually, it would take an effort, and you will be better off providing some additional info to motivate someone to make that effort, and then to also write and test a TOS version for you.

I hope you find someone who is willing to give you a hand with this.

Bob.

When one door closes, another opens.
-- Cervantes, Don Quixote
Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to bobwest for this post:
 
(login for full post details)
  #3 (permalink)
Weston
 
 
Posts: 2 since Feb 2020
Thanks: 1 given, 1 received


Thank you for your advise.

The study name in tradingview is "Blai5 Koncorde"

You will find the study attached

Any help will be appreciated!




bobwest View Post
Hi @ElyG,

To make your request more likely to get some interest, I suggest telling the prospective programmer what the indicator does, and perhaps include a screen shot and some explanation of how you find it useful to your trading.

As it is, you are asking someone to step through the code and try to figure out what in the world it does, and why it would be interesting to have it in TOS. Probably very few (as in, none ) are going to do this.

But if you give someone a reason to think it might be of use, then you have a better chance.

This is not a criticism, just advice from someone who has made a living programming for a long time. People who don't code for a living seem to think that someone who, for instance, knows pinescript would just read what you posted and get it right away. Actually, it would take an effort, and you will be better off providing some additional info to motivate someone to make that effort, and then to also write and test a TOS version for you.

I hope you find someone who is willing to give you a hand with this.

Bob.


Attached Thumbnails
Click image for larger version

Name:	Blai5 Koncorde.jpg
Views:	114
Size:	103.2 KB
ID:	286474  
Reply With Quote
The following user says Thank You to ElyG for this post:
 
(login for full post details)
  #4 (permalink)
glendale ca usa
 
 
Posts: 97 since Sep 2017
Thanks: 11 given, 75 received


ElyG View Post
Thank you for your advise.

The study name in tradingview is "Blai5 Koncorde"

You will find the study attached

Any help will be appreciated!

to begin with... the study can not be add it to the chart.

Reply With Quote
 
(login for full post details)
  #5 (permalink)
parkville
 
Experience: Beginner
Platform: thinkorswim
Trading: forex
 
Posts: 3 since Feb 2011
Thanks: 0 given, 0 received

If you want to learn thinkscript, John Carter has a course you can buy for that.

Reply With Quote


futures io Trading Community Platforms and Indicators ThinkOrSwim > Pinescript to Thinkscript code


March 26, 2020


Upcoming Webinars and Events
 

An Afternoon With futures io member TropicalTrader

Elite only
     



Copyright © 2020 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