NexusFi: Find Your Edge


Home Menu

 





Pinescript to Thinkscript code


Discussion in ThinkOrSwim

Updated
      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 4,262 views
    2. thumb_up 2 thanks given
    3. group 15 followers
    1. forum 4 posts
    2. attach_file 1 attachments




 
Search this Thread

Pinescript to Thinkscript code

  #1 (permalink)
ElyG
Weston
 
Posts: 2 since Feb 2020
Thanks Given: 1
Thanks Received: 1

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 NexusFi?
NexusFi Journal Challenge - April 2024
Feedback and Announcements
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Request for MACD with option to use different MAs for fa …
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
58 thanks
Battlestations: Show us your trading desks!
50 thanks
NexusFi site changelog and issues/problem reporting
47 thanks
GFIs1 1 DAX trade per day journal
32 thanks
What percentage per day is possible? [Poll]
31 thanks

  #2 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Frequency: Several times daily
Duration: Minutes
Posts: 8,158 since Jan 2013
Thanks Given: 57,294
Thanks Received: 26,253


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
Reply With Quote
The following user says Thank You to bobwest for this post:
  #3 (permalink)
ElyG
Weston
 
Posts: 2 since Feb 2020
Thanks Given: 1
Thanks Received: 1


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:	348
Size:	103.2 KB
ID:	286474  
Reply With Quote
The following user says Thank You to ElyG for this post:
  #4 (permalink)
alagrande
glendale ca usa
 
Posts: 97 since Sep 2017
Thanks Given: 11
Thanks Received: 88


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
  #5 (permalink)
 jeisenm 
parkville
 
Experience: Beginner
Platform: thinkorswim
Trading: forex
Posts: 3 since Feb 2011
Thanks Given: 0
Thanks Received: 0

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

Reply With Quote





Last Updated on March 26, 2020


© 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