Trading Articles
Article Categories
Article Tools

#ASIN_MESA
Updated June 22, 2019
trending_up
513 views
thumb_up
2 thanks given
group
3 followers
forum
2 posts
attach_file
0 attachments

Welcome to futures io: the largest futures trading community on the planet, with well over 125,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)

(login for full post details)

#1 (permalink )
glendale ca usa

Posts: 97 since Sep 2017

Thanks: 11 given,
87
received

declare lower;
#ASIN_CLOUDS_v2
#ASIN_MESA
input length = 8;
input over_Sold = 5;
input over_Bought = 80;
plot zerobase = 5;
zerobase.setStyle(curve.MEDIUM_DASH);
zerobase.setDefaultColor(color.white);
plot nine = -6;
nine.setDefaultColor(color.white);
nine.setStyle(curve.MEDIUM_DASH);
def highest = Highest(high, length);
def divisor =highest - Lowest(LOW, length);
plot W =- if divisor equals 0 then 0 else 100 - 100 * (highest - close) / divisor;
#plot OverBought = over_Bought;
#plot OverSold = over_Sold;
w.hide();
#Asin
input length0 = 24;
def height = close - close[length0];
def hypotenuse = Sqrt( Sqr(length0) + Sqr(height) );
#plot Angle2 = ASin(height2/hypotenuse2) * 180 / Double.Pi;
#plot Angle2 = ASin(W/hypotenuse) * 180 / Double.Pi;
plot Angle3 = - COS(W/hypotenuse) * 90 / Double.Pi;
Angle3.setDefaultColor(color.red);
#Asin
input length2 = 74;
def height2 = close - close[length2];
def hypotenuse2 = Sqrt( Sqr(length2) + Sqr(height2) );
plot Angle2 = ASin(angle3/hypotenuse2) * 100 / Double.Pi;
Angle2.setDefaultColor(color.green);
#Asin
input length1 = -8;
def height1 = close - close[length1];
def hypotenuse1 = log( Sqr(length1) + Sqr(height1) );
plot Angle1 = sqrt(height1/hypotenuse1) * 0 / Double.Pi;
Angle1.setDefaultColor(color.red);
Angle1.setLineWeight(3);
input lengthA = 8;
def heightA = close - close[lengthA];
def hypotenuseA = log( Sqr(lengthA) + Sqr(heightA) );
plot AngleA = sqrt(hypotenuseA/heightA) * 0 / Double.Pi;
AngleA.setDefaultColor(color.green);
AngleA.setLineWeight(5);
anglea.hide();
plot AA = (anglea==anglea);
AA.setDefaultColor(color.green);
AA.setLineWeight(5);
#
addcloud(angle3, angle2, color.green, color.red);
addcloud(angle3, angle2, color.green, color.red);
#
plot UpSignal = if angle3[2]>23 and angle3<-25 and angle1==angle1 then 0 else Double.NaN;
upsignal.setLineWeight(5);
#plot DownSignal = if RSI crosses below OverBought then OverBought else Double.NaN;
UpSignal.SetPaintingStrategy(PaintingStrategy.points );
upSignal.SetDefaultColor(Color.white);
#DownSignal.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
input price = hl2;
input lengthM = 25;
def realPart = fold indexR = 0 to lengthM with accuR = 0 do accuR + getValue(price, indexR, lengthM - 1) * Cos(2 * Double.Pi * indexR / lengthM);
def imagPart = fold indexI = 0 to lengthM with accuI = 0 do accuI + getValue(price, indexI, lengthM - 1) * Sin(2 * Double.Pi * indexI / lengthM);
def phase1 = if AbsValue(realPart) > 0.001 then ATan(imagPart / realPart) else (Double.Pi / 2 * Sign(imagPart));
def phase2 = if realPart < 0 then phase1 + Double.Pi else phase1;
def phase = if phase2 < 0 then phase2 + 2 * Double.Pi else if phase2 > 2 * Double.Pi then phase2 - 2 * Double.Pi else phase2;

The following 2 users say Thank You to alagrande for this post:

Best Threads (Most Thanked) in the last 7 days on futures io

(login for full post details)

#2 (permalink )
New York City, New York

Posts: 1 since May 2019

Thanks: 1 given,
0
received

Hello Alagrande,
I tried out your codes, and they are pretty nice. I wonder that you can send for me new code that you have to try out?
And by any chance, do you ever work on MACD multiple time frames?
Thank you!

(login for full post details)

#3 (permalink )
Seattle, WA/USA

Experience: Intermediate

Platform: TOS, TS

Trading: Forex, crude

Posts: 90 since Sep 2016

Thanks: 7 given,
32
received

Thank you for the script, looks interesting. Just as a heads up to anyone wanting to use this, the red bar denoting angle1 only appears 8 bars into the future (or 8 bars in the past depending on your frame of reference), at least with the default inputs. The clouds and the green bar are fine to use for signalling mode.

Last Updated on June 22, 2019

Right now
Ongoing
Right now
April
Register to Attend
Elite only