NexusFi: Find Your Edge


Home Menu

 





Trying to create SwamiChart for ADX


Discussion in MultiCharts

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




 
Search this Thread

Trying to create SwamiChart for ADX

  #1 (permalink)
 Cabs 
New York
 
Experience: Intermediate
Platform: MultiCharts
Trading: Stocks
Posts: 3 since Mar 2012
Thanks Given: 0
Thanks Received: 0

I have finished reading the articles on SwamiCharts and how to create them in the latest issues of TA of Stocks&Commodities.
I took a stab at creating these types of indicators. I successfully made one for the Inverse Fisher Stochastic but I am struggling with ADX.

Does anyone have experience using the 'For' Loop in Easylanguage?
It seems like the built in Function for ADX is not recalculating for every new value for 'N';

I can't seem to get values for different timeframes in the indicator only 1. Thanks for any help.



 
Code
// Swami ADX by Steven Caban 5/2/2012

Vars:
	N(0),
	Color1(0),
	Color2(0),
	Color3(0);

Arrays:
	adxval[48, 2](0);

For N = 12 to 48 Begin
	adxval[N, 2] = adxval[N, 1];                                  
	adxval[N,1] = ADX(N);

	If adxval[N, 1] >= 50 Then adxval[N, 1] = 50;
	If adxval[N, 1] < 0 Then adxval[N, 1] = 0;
End;


For N = 12 to 48 Begin
	If adxval[N, 1] >= 25 Then Begin
		Color1 = 255*(2-4*(.01*adxval[N, 1]));
		Color2 = 255;
		Color3 = 0;
	End
	Else If adxval[N, 1] < 25 Then Begin
		Color1 = 255;
		Color2 = 255*4*(.01*adxval[N, 1]);
		Color3 = 0;
	End;
	If N = 12 Then Plot12(12, "S12", RGB(Color1, Color2, Color3),0,4);
	If N = 13 Then Plot13(13, "S13", RGB(Color1, Color2, Color3),0,4);
	If N = 14 Then Plot14(14, "S14", RGB(Color1, Color2, Color3),0,4);
	If N = 15 Then Plot15(15, "S15", RGB(Color1, Color2, Color3),0,4);
	If N = 16 Then Plot16(16, "S16", RGB(Color1, Color2, Color3),0,4);
	If N = 17 Then Plot17(17, "S17", RGB(Color1, Color2, Color3),0,4);
	If N = 18 Then Plot18(18, "S18", RGB(Color1, Color2, Color3),0,4);
	If N = 19 Then Plot19(19, "S19", RGB(Color1, Color2, Color3),0,4);
	If N = 20 Then Plot20(20, "S20", RGB(Color1, Color2, Color3),0,4);
	If N = 21 Then Plot21(21, "S21", RGB(Color1, Color2, Color3),0,4);
	If N = 22 Then Plot22(22, "S22", RGB(Color1, Color2, Color3),0,4);
	If N = 23 Then Plot23(23, "S23", RGB(Color1, Color2, Color3),0,4);
	If N = 24 Then Plot24(24, "S24", RGB(Color1, Color2, Color3),0,4);
	If N = 25 Then Plot25(25, "S25", RGB(Color1, Color2, Color3),0,4);
	If N = 26 Then Plot26(26, "S26", RGB(Color1, Color2, Color3),0,4);
	If N = 27 Then Plot27(27, "S27", RGB(Color1, Color2, Color3),0,4);
	If N = 28 Then Plot28(28, "S28", RGB(Color1, Color2, Color3),0,4);
	If N = 29 Then Plot29(29, "S29", RGB(Color1, Color2, Color3),0,4);
	If N = 30 Then Plot30(30, "S30", RGB(Color1, Color2, Color3),0,4);
	If N = 31 Then Plot31(31, "S31", RGB(Color1, Color2, Color3),0,4);
	If N = 32 Then Plot32(32, "S32", RGB(Color1, Color2, Color3),0,4);
	If N = 33 Then Plot33(33, "S33", RGB(Color1, Color2, Color3),0,4);
	If N = 34 Then Plot34(34, "S34", RGB(Color1, Color2, Color3),0,4);
	If N = 35 Then Plot35(35, "S35", RGB(Color1, Color2, Color3),0,4);
	If N = 36 Then Plot36(36, "S36", RGB(Color1, Color2, Color3),0,4);
	If N = 37 Then Plot37(37, "S37", RGB(Color1, Color2, Color3),0,4);
	If N = 38 Then Plot38(38, "S38", RGB(Color1, Color2, Color3),0,4);
	If N = 39 Then Plot39(39, "S39", RGB(Color1, Color2, Color3),0,4);
	If N = 40 Then Plot40(40, "S40", RGB(Color1, Color2, Color3),0,4);
	If N = 41 Then Plot41(41, "S41", RGB(Color1, Color2, Color3),0,4);
	If N = 42 Then Plot42(42, "S42", RGB(Color1, Color2, Color3),0,4);
	If N = 43 Then Plot43(43, "S43", RGB(Color1, Color2, Color3),0,4);
	If N = 44 Then Plot44(44, "S44", RGB(Color1, Color2, Color3),0,4);
	If N = 45 Then Plot45(45, "S45", RGB(Color1, Color2, Color3),0,4);
	If N = 46 Then Plot46(46, "S46", RGB(Color1, Color2, Color3),0,4);
	If N = 47 Then Plot47(47, "S47", RGB(Color1, Color2, Color3),0,4);
	If N = 48 Then Plot48(48, "S48", RGB(Color1, Color2, Color3),0,4);
End;

Started this thread Reply With Quote




Last Updated on May 2, 2012


© 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