NexusFi: Find Your Edge


Home Menu

 





Can anyone help convert this pine script to EasyLanguage?


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Kolnidrei with 1 posts (0 thanks)
    2. looks_two Virrat with 1 posts (0 thanks)
    3. looks_3 jmi8844 with 1 posts (1 thanks)
    4. looks_4 muhfayaz12 with 1 posts (0 thanks)
    1. trending_up 7,973 views
    2. thumb_up 1 thanks given
    3. group 4 followers
    1. forum 2 posts
    2. attach_file 2 attachments




 
Search this Thread

Can anyone help convert this pine script to EasyLanguage?

  #1 (permalink)
jmi8844
Chicago
 
Posts: 2 since Oct 2020
Thanks Given: 0
Thanks Received: 1

It seems like its a variation of a channel breakout but having trouble with the exact conversion. Thanks

length = input(30, minval=1)
Value = input(30, minval=0)
highsma = sma(high, length)
lowsma = sma(low, length)
swing = iff(close > highsma[Value], 1, iff(close < lowsma[Value], -1, 0))
mah = highest(high, length)
mal = lowest(low, length)
stop = iff(swing==1, mal, iff(swing==-1, mah, stop[1]))
linecolor = iff(stop < low, green, red)
plot(stop, style=line, linewidth=2, color=linecolor)
len1 = input(1, "Base Length")
src = input(close, "Source")
sma1 = sma(src, len1)
longcondition = crossover(sma1,stop)
shortcondition = crossover(stop,sma1)
plotshape(longcondition, style = shape.triangleup, color = green, location = location.belowbar, text = "Long", size = size.small)
plotshape(shortcondition, style = shape.triangledown, color = red, location = location.abovebar, text = "Short", size = size.small)
alertcondition(longcondition, "Long", "Long")
alertcondition(shortcondition, "Short", "Short")

Reply With Quote
The following user says Thank You to jmi8844 for this post:

Can you help answer these questions
from other members on NexusFi?
NexusFi Journal Challenge - May 2024
Feedback and Announcements
Request for MACD with option to use different MAs for fa …
NinjaTrader
Looking for an MQL4 MetaTrader programmer/coder
The Elite Circle
Ninja Trader 8 Drawing Tools Wanted
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
51 thanks
NexusFi site changelog and issues/problem reporting
46 thanks
Battlestations: Show us your trading desks!
34 thanks
GFIs1 1 DAX trade per day journal
32 thanks
What percentage per day is possible? [Poll]
19 thanks

  #2 (permalink)
Kolnidrei
Lyon/France
 
Posts: 23 since Aug 2012
Thanks Given: 1
Thanks Received: 14

hi

 
Code
Inputs:
src(close), //"Source"
length(30, 1),
lookback(30, 0),
len1(1);   //"Base Length"
Vars:
highsma(0),lowsma(0),swing(0),mah(0),mal(0),stopp(0),sma1(0),
longcondition(false),shortcondition(false),linecolor(white);

highsma = AverageFC(high, length);
lowsma = AverageFC(low, length);
swing = iff(close > highsma[lookback], 1, iff(close < lowsma[lookback], -1, 0));
mah = highest(high, length);
mal = lowest(low, length);
stopp = iff(swing=1, mal, iff(swing=-1, mah, stopp[1]));
linecolor = iff(stopp < low, green, red);
plot1(stopp, "stop", linecolor, default, 2);
sma1 = AverageFC(src, len1);  
longcondition = sma1 crosses above stopp;
shortcondition = stopp crosses above sma1;
if longcondition then begin 
value1 = Text_New(D, T, L, "é");
Alert( "Long" ) ;
end;
if shortcondition then begin 
value2 = Text_New(D, T, H, "ê");
Alert( "Short" ) ;
end;
the arrows here should be activated with the wingdings
depending on the software you use...

Reply With Quote
  #3 (permalink)
muhfayaz12
Pakistan near Afghanistan
 
Posts: 1 since Mar 2022
Thanks Given: 0
Thanks Received: 0


can anyone convert these to easy language script to pine script that i would like be able to use trading veiw

Attached Files
You must login first File Type: docx 3-lines-of-code-SPY-Strategy (1).docx (13.1 KB, 25 views)
You must login first File Type: docx RSI-Thrust-Trading-Strategy-Code.docx (13.6 KB, 18 views)
Reply With Quote





Last Updated on March 24, 2022


© 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