NexusFi: Find Your Edge


Home Menu

 





#ASIN_MESA


Discussion in ThinkOrSwim

Updated
    1. trending_up 957 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

#ASIN_MESA

  #1 (permalink)
alagrande
glendale ca usa
 
Posts: 97 since Sep 2017
Thanks Given: 11
Thanks Received: 88

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;

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Increase in trading performance by 75%
The Elite Circle
MC PL editor upgrade
MultiCharts
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
GFIs1 1 DAX trade per day journal
15 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
My NQ Trading Journal
11 thanks
  #2 (permalink)
leminhat
New York City, New York
 
Posts: 1 since May 2019
Thanks Given: 1
Thanks Received: 0

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!

Reply With Quote
  #3 (permalink)
 kjhosken 
Seattle, WA/USA
 
Experience: Intermediate
Platform: TOS, TS
Trading: Forex, crude
Posts: 96 since Sep 2016
Thanks Given: 7
Thanks Received: 35


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.

Follow me on Twitter Reply With Quote




Last Updated on June 22, 2019


© 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