Skip to content

Instantly share code, notes, and snippets.

@marketcalls
Created June 25, 2016 11:41
Show Gist options
  • Save marketcalls/2d0f5914bafe4fb8235368a2a6320412 to your computer and use it in GitHub Desktop.
Save marketcalls/2d0f5914bafe4fb8235368a2a6320412 to your computer and use it in GitHub Desktop.
Predict Cycle
//Coded by Rajandran R
//Website : www.marketcalls.in
_SECTION_BEGIN("Predict Cycle");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}} - Cycle analysis indicator from www.marketcalls.in", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", colorDefault, styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
//Cycle Component
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Predict = PredictCycle(C,Periods);
Buy = Predict>Ref(Predict,-1);
Sell = Predict<Ref(Predict,-1);
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
Plot(Predict,"Predict",coloryellow,styleLine | styleThick);
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();
@mahsud1937
Copy link

Yes, i am having the same error. I have also checked and found that PredictCycle.dll is NOT somehow loading in AB - that could be reason!

@tgbssk
Copy link

tgbssk commented Nov 6, 2023

it will not work without plugin DLL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment