Profficinals in times frame formula i have simple qustion

THE LORD

Active Member
#1
_SECTION_BEGIN("Expand stochastic");
n=Param("TM",1,1,60,1);
TimeFrameSet( n*inDaily);
T = StochK(8,3);
TimeFrameRestore();
TimeFrameSet(n*inDaily);
F=StochD(8,3,3);
TimeFrameRestore();
Plot( TimeFrameExpand(T ,n*inDaily,0 ), "", colorBlue,styleDots+styleThick);
Plot( TimeFrameExpand(F,n*inDaily,0), "", colorYellow,styleDots+styleThick);
Buy=Cross(TimeFrameExpand(T ,n*inDaily,0 ),TimeFrameExpand(F ,n*inDaily,0 ));
Sell=Cross(TimeFrameExpand(F ,n*inDaily,0 ),TimeFrameExpand(T ,n*inDaily,0 ));
_SECTION_END();
-------------------------------------------------
-------------------------------------------------
_SECTION_BEGIN("Unnamed 7");
n=Param("TM",1,1,60,1);
TimeFrameSet(n*inDaily);
Plot(StochK(8,3),"",colorBlue,styleDots+styleThick);
Plot(StochD(8,3,3),"",colorYellow,styleDots+styleThick);
Buy=Cross(StochK(8,3),StochD(8,3,3));
Sell=Cross(StochD(8,3,3),StochK(8,3));
_SECTION_END();

this two fromula for stochastic by time daily time frame
my qustion is why they are not gave me the same values for fast and slow stochastic and how i can make them gave exat values for fast and slow stochastic ?
in the first formula the stochastic more slow than the second fromula
how i can make them gave me exat values for poth stochastics in the tow formulas
 

rona

New Member
#4
_SECTION_BEGIN("Expand stochastic");
n=Param("TM",1,1,60,1);
TimeFrameSet( n*inDaily);
T = StochK(8,3);
TimeFrameRestore();
TimeFrameSet(n*inDaily);
F=StochD(8,3,3);
TimeFrameRestore();
Plot( TimeFrameExpand(T ,n*inDaily,0 ), "", colorBlue,styleDots+styleThick);
Plot( TimeFrameExpand(F,n*inDaily,0), "", colorYellow,styleDots+styleThick);
Buy=Cross(TimeFrameExpand(T ,n*inDaily,0 ),TimeFrameExpand(F ,n*inDaily,0 ));
Sell=Cross(TimeFrameExpand(F ,n*inDaily,0 ),TimeFrameExpand(T ,n*inDaily,0 ));
_SECTION_END();

_SECTION_BEGIN("Unnamed 7");
n=Param("TM",1,1,60,1);
TimeFrameSet(n*inDaily);
Plot(StochK(8,3),"",colorBlue,styleDots+styleThick );
Plot(StochD(8,3,3),"",colorYellow,styleDots+styleThick);
Buy=Cross(StochK(8,3),StochD(8,3,3));
Sell=Cross(StochD(8,3,3),StochK(8,3));
_SECTION_END();
 
#5
I got this afl called "NMA Swing System" since i could not decode the formula please any one give me same in excel or give link where i can get the same result in excel worksheet

thanks in advance

_SECTION_BEGIN("NICK MA Swing");
SetBarsRequired(200,0);

GraphXSpace = 5;
SetChartOptions(0,chartShowArrows|chartShowDates);
k = Optimize("K",Param("K",1,0.25,5,0.25),0.25,5,0.25) ;
Per= Optimize("atr",Param("atr",4,3,20,1),3,20,1);
HACLOSE=(O+H+L+C)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "" + Name(), colorBlack, styleCandle | styleNoLabel );
j=Haclose;

//================================================== ================================================== ===================
//=========================Indicator================ ================================================== ============================
f=ATR(14);

rfsctor = WMA(H-L, Per);

revers = k * rfsctor;

Trend = 1;
NW[0] = 0;


for(i = 1; i < BarCount; i++)
{
if(Trend[i-1] == 1)
{
if(j < NW[i-1])
{
Trend = -1;
NW = j + Revers;
}
else
{
Trend = 1;
if((j - Revers) > NW[i-1])
{
NW = j - Revers;
}
else
{
NW = NW[i-1];
}
}
}
if(Trend[i-1] == -1)
{
if(j > NW[i-1])
{
Trend = 1;
NW = j - Revers;
}
else
{
Trend = -1;
if((j + Revers) < NW[i-1])
{
NW = j + Revers;
}
else
{
NW = NW[i-1];
}
}
}
}

//===============system================

Plot(NW, "", IIf(Trend == 1, 27, 4), 4);
Buy=Cover=Cross(j,nw);
Sell=Short=Cross(nw,j);
SellPrice=ValueWhen(Sell,C,1);
BuyPrice=ValueWhen(Buy,C,1);
Long=Flip(Buy,Sell);
Shrt=Flip(Sell,Buy );
_SECTION_END();
//=================TITLE============================ ================================================== ==================
_SECTION_BEGIN("Title");
if( Status("action") == actionIndicator )
(
Title = EncodeColor(colorWhite)+ "NICK MA Swing System" + " - " + Name() + " - " + EncodeColor(colorRed)+ Interval(2) + EncodeColor(colorWhite) +
" - " + Date() +" - "+"\n" +EncodeColor(colorYellow) +"Op-"+O+" "+"Hi-"+H+" "+"Lo-"+L+" "+
"Cl-"+C+" "+ "Vol= "+ WriteVal(V)+"\n"+
EncodeColor(colorLime)+
WriteIf (Buy , " GO LONG / Reverse Signal at "+C+" ","")+
WriteIf (Sell , " EXIT LONG / Reverse Signal at "+C+" ","")+"\n"+EncodeColor(colorWhite)+
WriteIf(Sell , "Total Profit/Loss for the Last Trade Rs."+(C-BuyPrice)+"","")+
WriteIf(Buy , "Total Profit/Loss for the Last trade Rs."+(SellPrice-C)+"","")+
WriteIf(Long AND NOT Buy, "Trade : Long - Entry price Rs."+(BuyPrice),"")+
WriteIf(shrt AND NOT Sell, "Trade : Short - Entry price Rs."+(SellPrice),"")+"\n"+
WriteIf(Long AND NOT Buy, "Current Profit/Loss Rs."+(C-BuyPrice)+"","")+
WriteIf(shrt AND NOT Sell, "Current Profit/Loss Rs."+(SellPrice-C)+"",""));
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45);
_SECTION_END();