TRADESIGNAL ONLINE: SWAMICHARTS STOCHASTICS
- Details
- Parent Category: Departments
- Category: Traders' Tips
- Written by Sebastian Schenck

The SwamiCharts stochastics indicator introduced by John Ehlers & Ric Way in their article in this issue, “Introducing SwamiCharts,” can easily be used with our online charting tool at www.tradesignalonline.com. Just check the Infopedia section for our lexicon. There, you will see the SwamiCharts stochastics indicator that you can make available for your personal account. Click on it and select Open Script. The indicator will then be available for you to apply to any chart you wish. See Figure 13 for an example.
FIGURE 13: TRADESIGNAL ONLINE, SWAMICHARTS STOCHASTICS. Here is a chart by Tradesignal Online with the SwamiCharts stochastics indicator shown on a daily chart of the S&P 500.
The source code is shown here:
Meta:
Subchart( True ),
Synopsis("Swamichart Stochastics Indicator, based on John Ehlers march 2012 article in TAS&C."),
Weblink("http://www.tradesignalonline.com/lexicon/view.aspx?id=Swamicharts%20Stochastics");
Vars:
N(0), J(0), HH(0), LL(0), Color1(0), Color2(0), Color3(0);
Arrays:
Stoc[48, 2](0), Num[48, 2](0), Denom[48, 2](0);
For N = 6 to 48
Begin
Num[N, 2] = Num[N, 1];
Denom[N, 2] = Denom[N, 1];
Stoc[N, 2] = Stoc[N, 1];
HH = 0;
LL = 1000000;
For J = 0 to N - 1
Begin
If Close[J] > HH Then
HH = Close[J];
If Close[J] < LL Then
LL = Close[J];
End;
Num[N, 1] = .5*(Close - LL) + .5*Num[N, 2];
Denom[N, 1] = .5*(HH - LL) + .5*Denom[N, 2];
If Denom[N, 1] <> 0 Then
Stoc[N, 1] = .2*(Num[N, 1] /
Denom[N, 1]) + .8*Stoc[N, 2];
End;
For N = 6 to 48
Begin
If Stoc[N, 1] >= .5 Then
Begin
Color1 = 255*(2 - 2*Stoc[N, 1]);
Color2 = 255;
Color3 = 0;
End
Else If Stoc[N, 1] < .5 Then
Begin
Color1 = 255;
Color2 = 255*2*Stoc[N, 1];
Color3 = 0;
End;
If N = 4 Then Plot4(4, "S4", RGB(Color1, Color2, Color3), 0,4);
If N = 5 Then Plot5(5, "S5", RGB(Color1, Color2, Color3),0,4);
If N = 6 Then Plot6(6, "S6", RGB(Color1, Color2, Color3),0,4);
If N = 7 Then Plot7(7, "S7", RGB(Color1, Color2, Color3),0,4);
If N = 8 Then Plot8(8, "S8", RGB(Color1, Color2, Color3),0,4);
If N = 9 Then Plot9(9, "S9", RGB(Color1, Color2, Color3),0,4);
If N = 10 Then Plot10(10, "S10", RGB(Color1, Color2, Color3),0,4);
If N = 11 Then Plot11(11, "S11", RGB(Color1, Color2, Color3),0,4);
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;
// *** Copyright tradesignal GmbH ***
// *** www.tradesignal.com ***

