+91-0000000000

}

Monday – Friday : 9:00 AM – 6:30 PM

LTS Oscillation

The ‘LTS Oscillation’ AFL likely involves an oscillator-based indicator within the Amibroker platform. Utilizing the Amibroker data feed, it might compute and display oscillations or fluctuations in market trends, assisting traders in identifying potential turning points or reversals.

/
_SECTION_BEGIN("Linkon's Day Trading System");
 

icol = IIf ( MA (Close,25) > Ref (MA (Close,25),-1),colorGreen,colorRed);

//Plot( MA( High, 25 ),"", icol, styleThick);
//Plot( MA( Low, 25 ), "",icol, styleThick);
w = Param ("filter",2.5,0,10,0.5);
MAa = Param("ma band",25,5,100,1);
upper_sl = MA( High, MAa )+ w;
Lower_sl = MA(Low,MAa)-w;
Plot( upper_sl, "", icol, styleThick ); 
Plot (Lower_sl,"", icol, styleThick);
Color_buy = IIf(Close > EMA(Close,55) AND Close > EMA(High,25),colorBlue,IIf(Close < EMA(Close,55) AND Close < EMA(Low,25),colorRed,colorYellow));

PlotOHLC( Open, High, Low, Close, "", Color_buy, styleCandle ); 
_SECTION_END();

  
_SECTION_BEGIN("EMA fabonachi");

fab5 = EMA(Close,5);
fab8 = EMA(Close,8);
fab13 = EMA(Close,13);
fab21 = EMA(Close,21);
fab34 = EMA(Close,34);
fab55 = EMA(Close,55);
fab89 = EMA(Close,89); 

Color_fab5 = IIf(Close > fab5,ColorRGB(197,254,214),colorPink);
Color_fab8 = IIf(Close > fab8,ColorRGB(197,254,214),colorPink);
Color_fab13 = IIf(Close > fab13,ColorRGB(197,254,214),colorPink);
Color_fab21 = IIf(Close > fab21,ColorRGB(197,254,214),colorPink);
Color_fab34 = IIf(Close > fab34,ColorRGB(197,254,214),colorPink);
Color_fab55 = IIf(Close > fab55,ColorRGB(197,254,214),colorPink);
Color_fab89 = IIf(Close > fab89,ColorRGB(197,254,214),colorPink);

Plot( fab55, "", Color_fab55, styleDashed ); 
_SECTION_END();
dist = 0.25*ATR(10); 
Capital=Param("Total capital",100000,10000,1000000,1000);
drawdown=Param("Max. loss per trade as % of Capital", 1.0,0.5,25.0,0.1);
room=Param("Room for S/L as % of Pivot value",0.001,0.001,0.02,0.001);

PH= ValueWhen(
(Ref(H,-2) > Ref(H, -4)) AND
(Ref(H,-2) > Ref(H, -3)) AND
(Ref(H,-2) > Ref(H, -1)) AND
(Ref(H,-2) > H), Ref(H,-2));

PL= ValueWhen(
(Ref(L,-2) <= Ref(L, -4)) AND
(Ref(L,-2) <= Ref(L, -3)) AND
(Ref(L,-2) <= Ref(L, -1)) AND
(Ref(L,-2) <= L), Ref(L,-2));

phfilter=PH+(room*PH);
plfilter=PL-(room*PL);

//Plot(Ref(PH,2), "UpPivot", ParamColor("UpPivot Color",colorGreen), styleDashed);
//Plot(Ref(PL,2), "DownPivot",ParamColor("DownPivot Color",colorRed), styleDashed);

/*

for (a=4;a= H[a-4]) AND
(H[a-2] >= H[a-3]) AND
(H[a-2] >= H[a-1]) AND
(H[a-2] >= H[a]))
PlotText("PH \n"+H[a-2], a-2, H[a-2], colorGreen);

if ((L[a-2] <= L[a-4]) AND
(L[a-2] <= L[a-3]) AND
(L[a-2] <= L[a-1]) AND
(L[a-2] <= L[a]))
PlotText("PL \n"+L[a-2], a-2, L[a-2]-dist[a-2], colorRed);
}
*/

_SECTION_END();


_SECTION_BEGIN("fabo cloud");

Lo = IIf (fab55>fab34,fab34,fab55);
Hi = IIf (fab55fab34,fab34,fab55);
Hi1 = IIf (fab55fab21,fab21,fab34);
Hi2 = IIf (fab34fab13,fab13,fab21);
Hi3 = IIf (fab21fab8,fab8,fab13);
Hi4 = IIf (fab13fab5,fab5,fab8);
Hi5 = IIf (fab8 EMA(C, 55), WriteVal(upper_sl),WriteVal(EMA(C,55))) 
+ EncodeColor(colorGreen)+ "   Trailing SL of :"+ EncodeColor(colorWhite)+EMA(L,25) 

+ EncodeColor(colorRed)+ "\n Pivot  Low : "+EncodeColor(colorWhite)+PL+EncodeColor(colorRed)+"  Place SHORT Trigger at :"+ EncodeColor(colorWhite)+WriteIf(MA (L, 25) < EMA(C, 55), WriteVal(Lower_sl),WriteVal(EMA(C,55))) + EncodeColor(colorRed)+"   Training SL of :"+ EncodeColor(colorWhite)+EMA (H,25)
;

_SECTION_BEGIN("ADXbuy.afl");
/*ADX system
goldfreaz - 18 April 2002

Buy:  slope ADX > slope ADX threshold and
      ADX > ADX threshold + ADX histeresis and
      PDI > ADX + DI histeresis and
      slope PDI - slope MDI > slope DI threshold and
      PDI > ADX

Sell:  {ADX > ADX threshold - ADX histeresis and
       PDI < ADX - DI histeresis} or
       MDI > PDI + DI histeresis      

with  optimization */ 



// ADX and PDI/MDI have different smoothing constants
// smoothing defined as a exponential daily average, not Wilder's nonsense
Aperiod=11;
Bperiod=13;
ADXthreshold=18;
dadxthr=0.5;
slpadxD=18;
slpadxthr=0.35;
dPM=3.5;
slppmD=3;
slpPMthr=-0.65;
  //Aperiod=Optimize("Aperiod",13,11,15,1);
  //Bperiod=Optimize("Bperiod",14,13,17,1);
  //ADXthreshold=Optimize("ADXthreshold",17,16,18,0.25);
  //dadxthr=Optimize("dADXthr",0.25,0,1.5,0.25);
  //slpadxD=Optimize("slpadxD",12,18,22,1);
  //slpadxthr=Optimize("slpadxthr",0.35,0.2,0.5,0.05);
  //dPM=Optimize("dPM",1,3.5,4,0.2);
  //slppmD=Optimize("slppmD",3,2,4,1);
  //slpPMthr=Optimize("slpPMthr",-0.65,-1,-0.5,0.05);
Ppdi=PDI(Bperiod);
Mmdi=MDI(Bperiod);
dx=100*abs(Ppdi-Mmdi)/(Ppdi+Mmdi);
Aadx=EMA(dx,Aperiod);
slpadx=(Aadx-Ref(MA(Aadx,slpadxD),-1))/slpadxD;
slpPM=(Ppdi-Ref(EMA(Ppdi,slppmD),-1)-Mmdi+Ref(EMA(Mmdi,slppmD),-1))/slppmD;

Buy =slpadx>slpadxthr AND Aadx>ADXthreshold+dadxthr AND Ppdi>Mmdi+dPM AND slpPM>slpPMthr AND Ppdi>Aadx;

Sell=(Aadx>ADXthreshold-dadxthr AND PpdiPpdi+dPM;

  Filter=Buy OR Sell; 
  Sell=ExRem(Sell,Buy); Buy=ExRem(Buy,Sell);

AddColumn(Buy,"Buy");
AddColumn(Sell,"sell");
AddColumn(Aadx,"Aadx");
AddColumn(slpPM,"slpPM");
AddColumn(BuyPrice,"BuyPrice");
AddColumn(SellPrice,"SellPrice");
_SECTION_END();

Open chat
1
Hi, how can I help you?