Does anyone know how to produce Swamicharts in Metastock?!?! I got this code from a magazine I subscribe to but cannot get it to work with metastock. If anyone knows how set up Swamicharts in metastock for Volume, RSI, Stochastics, CCI or any other indicator I'd appreciate it.
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;
//Plot as a Heatmap
For N = 6 to 48 Begin
// StopLight Colors
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;