NexusFi: Find Your Edge


Home Menu

 





Can someone help to translate Pine Code to Easy Language ?


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Quick Summary with 1 posts (0 thanks)
    2. looks_two ernestho with 1 posts (0 thanks)
    3. looks_3 Kolnidrei with 1 posts (0 thanks)
    4. looks_4 Shaban with 1 posts (0 thanks)
    1. trending_up 3,723 views
    2. thumb_up 0 thanks given
    3. group 4 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
ernestho
Kowloon, Hong Kong
 
Posts: 1 since Mar 2019
Thanks Given: 0
Thanks Received: 0

I found one script from tradingview. It looks interesting. Can someone help to convert Pine Code to EasyLanguage ?


 
Code
 
//@version=2 
//created by StevenH and SeaSide420

study("TC True Strength Indicator", shorttitle="TSI")
long = input(title="Long Length", type=integer, defval=35)
short = input(title="Short Length", type=integer, defval=35)
signal = input(title="Signal Length", type=integer, defval=13)
linebuy = input(title="Upper Line", type=integer, defval=4)
linesell = input(title="Lower Line", type=integer, defval=-4)
price = close
double_smooth(src, long, short) =>
    fist_smooth = ema(src, long)
    ema(fist_smooth, short)
pc = change(price)
double_smoothed_pc = double_smooth(pc, long, short)
double_smoothed_abs_pc = double_smooth(abs(pc), long, short)
tsi_value = 100 * (double_smoothed_pc / double_smoothed_abs_pc)
keh = tsi_value>linesell?lime:orange
teh = ema(tsi_value, signal)>linebuy?orange:red
meh = ema(tsi_value, signal)>tsi_value?red:lime
plot(tsi_value, color=keh, linewidth=2)
plot(ema(tsi_value, signal), color=teh, linewidth=2)
plot(linebuy,color=green),plot(linesell,color=red)
plot(cross(tsi_value, ema(tsi_value, signal)) ? tsi_value : na, style = circles, color=meh, linewidth = 3)
hline(0, title="Zero")


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
Trump Media to sell instant access to market-moving soci …
Traders Hideout
Datafeed for Atas
Platforms and Indicators
My Rant with AMP Futures
Trading Reviews and Vendors
No book, only a stair: journaling fills where price move …
Cryptocurrency
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Mes vs MNQ
6 thanks
NexusFi site changelog and issues/problem reporting
5 thanks
BERN ALGOS algo trading journal
3 thanks
Johnnys Journal
2 thanks
TopStep Trader disappointment
2 thanks
  #3 (permalink)
Kolnidrei
Lyon/France
 
Posts: 23 since Aug 2012
Thanks Given: 1
Thanks Received: 14


Hi, sometimes one needs some patience to get answers...

 
Code
Inputs:
price(close),
long(35),
shortt(35),
signal(13),
linebuy(4),
linesell(-4),
Width(10);
Vars:
pc(0),first_smooth_pc(0),double_smoothed_pc(0),first_smooth_abs_pc(0),x(0),
double_smoothed_abs_pc(0),tsi_value(0),keh(white),teh(white),meh(white);

pc = price - price[1];
first_smooth_pc = XAverage(pc, long);
double_smoothed_pc = XAverage(first_smooth_pc, shortt);
first_smooth_abs_pc = XAverage(abs(pc), long);
double_smoothed_abs_pc = XAverage(first_smooth_abs_pc, shortt);
tsi_value = 100 * (double_smoothed_pc / double_smoothed_abs_pc);
x = XAverage(tsi_value,signal);
keh = iff(tsi_value>linesell,colorlime,
iff(tsi_value<linesell,colororange,keh[1]));
teh = iff(x>linebuy,colororange,
iff(x<signal,red,teh[1]));
meh = iff(x>tsi_value,red,
iff(x<tsi_value,colorlime,meh[1]));
Drawline(tsi_value,"tsi",stylesolid,2,keh);
Drawline(x,"ema_tsi",stylesolid,2,teh);
Drawline(linebuy,"buy",styledash,1,green);
Drawline(linesell,"sell",styledash,1,red);
Drawline(0,"zero",styledash,1,yellow);
if tsi_value crosses x or x crosses tsi_value then
DrawSymbol(tsi_value,"cross",SymbolCircle,Width,meh,meh);


Reply With Quote
  #4 (permalink)
Shaban
Turin + Italy
 
Posts: 201 since Feb 2020
Thanks Given: 26
Thanks Received: 138

In my archive I have found this formula in easylanguage of True Strength Indicator:

{True Strength Indicator}

Input:
length1(34),
length2(8),
length3(5);

If(absvalue(c-c[1])<>0) then begin;
Plot1(100*(xaverage(xaverage(c-c[1],length1),length2)/
(xaverage(xaverage(absvalue(c-c[1]),length1),length2))),"Plot1");

Plot2(xaverage(100*(xaverage(xaverage(c-c[1],length1),length2)/
(xaverage(xaverage(absvalue(c-c[1]),length1),length2))),length3),"Plot2");

Plot3((0),"Plot3");
end;



[img]https://i.postimg.cc/GhXYd3Sp/True-Strength-Indicator.jpg[/img]


Reply With Quote




Last Updated on June 17, 2021


© 2026 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 - Downloads - Top
no new posts