convert this AMIBROKER AFL to ctrader algo file

25 USD  Payment method:  Direct Payment
Open

I want to convert this  AMIBROKER AFL TO CTRADER .ALGO file

i dont want any ROBO or AUTOMATE TRADING strictly

 





_SECTION_BEGIN("Archana's Day Trading System");


icol = IIf ( MA (Close,25) > Ref (MA (Close,25),-1),colorBlue,colorDarkRed);

//Plot( MA( High, 25 ),"", icol, styleThick);
//Plot( MA( Low, 25 ), "",icol, styleThick);

Color_buy = IIf(Close > EMA(Close,89) AND Close > EMA(High,25),colorBlue,IIf(Close < EMA(Close,89) AND Close < EMA(Low,25),colorDarkRed,colorCustom12));

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

_SECTION_BEGIN("Trend Lines");
p1 = Param("TL 1 Periods", 20, 5, 50, 1);
p2 = Param("TL 2 Periods", 5, 3, 25, 1);
TL1 = LinearReg(C, p1);
TL2 = EMA(TL1, p2);
Col1 = IIf(TL1 > TL2, ParamColor("TL Up Colour", colorGreen), ParamColor("TL Dn Colour", colorRed));
Plot(TL1, "TriggerLine 1", Col1, styleDots);
//Plot(TL2, "TriggerLine 2", Col1, styleLine);
_SECTION_END();

a=20;
GraphXSpace=5;
p=30;
p = Param("p",30,2,100,1);

Om=DEMA(O,p);
hm=DEMA(H,p);
lm=DEMA(L,p);
Cm=DEMA(C,p);
HACLOSE=(Om+Hm+Lm+Cm)/4;
HaOpen = AMA( Ref( HaClose, -1), 1);
HaHigh = Max( Hm, Max( HaClose, HaOpen ) );
HaLow = Min( Lm, Min( HaClose, HaOpen ) );

slope = Param("slope",2,2,100,1);

Color20= IIf(LinRegSlope(MA(HaClose,a),slope)<0,colorDarkRed,colorLavender);
//Plot(MA(HaClose,a),"", color20,styleThick);

Color=IIf(Haclose>MA(HaClose,a),colorLavender, colorRed);
//PlotOHLC( HaOpen, HaOpen, HaClose, HaClose, "" + Name(), Color, styleDots|shapeSmallCircle);
_SECTION_END();

//---- heikin ashi
py = Param("pc", 9, 0, 100,1 );
HaClose = (EMA(O,py)+EMA(H,py)+EMA(L,py)+EMA(C,py))/4; 
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 ); 
HaHigh = Max( H, Max( HaClose, HaOpen ) ); 
HaLow = Min( L, Min( HaClose, HaOpen ) ); 
xDiff = (HaHigh - Halow) * IIf(StrFind(Name(),"JPY"),100,10000);
barcolor = IIf(HaClose >= HaOpen,colorBrightGreen,colorOrange);
//PlotOHLC( HaOpen, Haopen, Haclose, HaClose, "", barcolor, styleCandle|styleThick ); 
//Plot(EMA(HaClose,9),"",colorWhite, styleLine);
//Plot(EMA(HaClose,18),"",colorTurquoise, styleLine);

_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( fab89, "", Color_fab89, styleDashed ); 
_SECTION_END();


_SECTION_BEGIN("Priyanvada's Price Action");
P = ParamField( "Price field" );
CandleT=ParamToggle("Candlestick Display","No|Yes",defaultval=1 ); 
BarT=ParamToggle("Bar Display","No|Yes",defaultval=0 );
LineT=ParamToggle("Line Display","No|Yes",defaultval=0 );
//T3MA toggle
T3MAT=ParamToggle("Moving Average","No|Yes",defaultval=1 ); 
//T3MA Check Periods
T3MAP = Param("T3MA Periods", 46, 2, 300, 1, 10 );

function T3(price,periods)
{
s = 0.84;
e1=EMA(price,periods);
e2=EMA(e1,Periods);
e3=EMA(e2,Periods);
e4=EMA(e3,Periods);
e5=EMA(e4,Periods);
e6=EMA(e5,Periods);
c1=-s*s*s;
c2=3*s*s+3*s*s*s;
c3=-6*s*s-3*s-3*s*s*s;
c4=1+3*s+s*s*s+3*s*s;
Ti3=c1*e6+c2*e5+c3*e4+c4*e3;
return ti3;
}
T3MA = T3(P,T3MAP);
for( i = 1; i < BarCount; i++ ) 
{
//assignments
NvadaOpen[i] = Close[i-1];
NvadaClose[i]=Close[i];
NvadaHigh[i]=IIf(NvadaOpen[i]>=NvadaClose[i],NvadaOpen[i],NvadaClose[i]);
NvadaLow[i]=IIf(NvadaOpen[i]>=NvadaClose[i],NvadaClose[i],NvadaOpen[i]);
averagechange[i]=(NvadaOpen[i]+NvadaClose[i])/2;

//=============================
//CHECKS

//check1= uptrend and upbar as referred for last 2 bars
Check1[i]=averagechange[i]>T3MA[i] AND NvadaClose[i]>=NvadaOpen[i-2];
//check2= uptrend and downbar as referred for last 2 bars
Check2[i]=averagechange[i]>T3MA[i] AND NvadaClose[i]<NvadaOpen[i-2];

//check3= downtrend and downbar as referred for last 2 bars
Check3[i]=averagechange[i]<T3MA[i] AND NvadaClose[i]<=NvadaOpen[i-2];
//check4= downtrend and upbar as referred for last 2 bars
Check4[i]=averagechange[i]<T3MA[i] AND NvadaClose[i]>NvadaOpen[i-2];

//check5=check2 or check 4 => possible corrections!
Check5[i]=Check2[i] OR Check4[i];

//Color assignment
if(Check1[i]==1){pricolor[i] =colorGreen;}
if(Check3[i]==1){pricolor[i] =colorRed;}
if(Check5[i]==1){pricolor[i] =colorYellow;}
//Pricolor = IIf(NvadaClose>Ref(NvadaOpen,-2),colorGreen,colorRed);
}



//T3MA Display
if(T3MAT==1)
{
T3MAcolor = IIf(C>=T3MA,colorGreen,colorRed);
Plot(T3MA,"T3MA",T3MAcolor,styleThick|styleStaircase);
}
Buy=T3MAcolor==colorGreen;
Sell=T3MAcolor==colorRed;
Short=Sell;
Cover=Buy;

Cover=ExRem(Cover,Short);
Short=ExRem(Short,Cover);

Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
//PlotShapes(IIf(Buy , shapeUpArrow, shapeNone),colorWhite); 
//PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorYellow);
no=Param( "Swing", 12, 1, 55 );
tsl_col=ParamColor( "Color", colorLightGrey );

res=HHV(H,no);
sup=LLV(L,no);
avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
tsl=IIf(avn==1,sup,res);


//Plot(tsl, _DEFAULT_NAME(), tsl_col, styleStaircase);




SetPositionSize(300,spsShares);
ApplyStop(0,1,10,1);
//-----------end--------------
Long=Flip(Buy,Sell); 
Shrt=Flip(Sell,Buy); 

BuyPrice=ValueWhen(Buy,C);
SellPrice=ValueWhen(Sell,C);


Edc=(
WriteIf (Buy AND Ref(shrt,-1), " BUY @ "+C+"  ","")+ 
WriteIf (Sell AND Ref(Long,-1), " SEll @ "+C+"  ","")+
WriteIf(Sell , "Last Trade Profit Rs."+(C-BuyPrice)+"","")+
WriteIf(Buy  , "Last Trade Profit Rs."+(SellPrice-C)+"",""));
_SECTION_END();



_SECTION_BEGIN("market price");
//Magfied Market Price 
FS=Param("Font Size",30,11,100,1); 
GfxSelectFont("Times New Roman", FS, 700, True );  
GfxSetBkMode( colorWhite );  
GfxSetTextColor( ParamColor("Color",colorBrightGreen) );  
Hor=Param("Horizontal Position",590,1,1200,1); 
Ver=Param("Vertical Position",12,1,830,1);  
GfxTextOut(""+C, Hor , Ver ); 
YC=TimeFrameGetPrice("C",inDaily,-1); 
DD=Prec(C-YC,2); 
xx=Prec((DD/YC)*100,2); 
GfxSelectFont("Times New Roman", 11, 700, True );  
GfxSetBkMode( colorBlack );  
GfxSetTextColor(ParamColor("Color",colorYellow) );  
GfxTextOut(""+DD+" ("+xx+"%)", Hor , Ver+45 ); 
_SECTION_END();

_SECTION_BEGIN("Open Range Breakout");

SetBarsRequired(-2,-2); //Turn Quick AFL Off

_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g ", O,H,L, C));

SetChartOptions(0 , chartShowArrows | chartShowDates);
//Plot(Close,"Candle", colorDefault, styleCandle);


newday = Day() != Ref(Day(),-1);  //check if new day or not

starttime = ValueWhen(newday,TimeNum());
tn = TimeNum();

//5min ORB

IBendtime = starttime+500;
minh = ValueWhen(newday,TimeFrameGetPrice("H",in5Minute));
minl = ValueWhen(newday,TimeFrameGetPrice("L",in5Minute));

DayOpen = TimeFrameGetPrice("O",inDaily);
DayHigh = TimeFrameGetPrice("H",inDaily);
DayLow = TimeFrameGetPrice("L",inDaily);

ORBH = IIf(TimeNum() < IBendtime, Null ,minh);
ORBL = IIf(TimeNum() < IBendtime, Null, minl);

_SECTION_END();


_SECTION_BEGIN("Camarilla Levels");
 
 
EntrySignal = C > ( LLV( L, 20 ) + 2 * ATR( 10 ) ); 
ExitSignal = C < ( HHV( H, 20 ) - 2 * ATR( 10 ) ); 
Color = IIf( EntrySignal, colorBlue, IIf( ExitSignal, colorRed, colorGrey50 ));
 
DayH = TimeFrameGetPrice("H", inDaily, -1);// yesterdays high 
DayL = TimeFrameGetPrice("L", inDaily, -1);//low 
DayC = TimeFrameGetPrice("C", inDaily, -1);//close 
DayO = TimeFrameGetPrice("O", inDaily);// current day open 
HiDay = TimeFrameGetPrice("H", inDaily); 
LoDay = TimeFrameGetPrice("L", inDaily);
 
TimeFrameSet( inDaily );
 
H5 = (DayH / DayL) * DayC;
H4 = (((DayH / DayL) + 0.83) / 1.83) * DayC;
H3 = ( ( (DayH / DayL) + 2.66) / 3.66) * DayC;


L3 = (2-(( DayH / DayL) + 2.66) / 3.66) * DayC;
L4 = (2-( (DayH / DayL) + 0.83) / 1.83) * DayC;
L5 = (2-( DayH / DayL)) * DayC;


ShowH4 = ParamToggle("H4", "yes|no");
H4Color=ParamColor( "H4Color", colorDarkRed );
ShowH3 = ParamToggle("H3", "yes|no");
H3Color=ParamColor( "H3Color", colorRed );

 
ShowL3 = ParamToggle("L3", "yes|no");
L3Color=ParamColor( "L3Color", colorGreen );
ShowL4 = ParamToggle("L4", "yes|no");
L4Color=ParamColor( "L4Color", colorDarkGreen );

style = styleLine + styleNoRescale ; 
 

if(ShowH4 == False) 
Plot(H4, "H4",H4Color,Style);
if(ShowH3 == False)
Plot(H3, "H3",H3Color,styleDots,styleThick,1);

if(ShowL3 == False)
Plot(L3, "L3",L3Color,styleDots,styleThick,1);
if(ShowL4 == False) 
Plot(L4, "L4",L4Color,style);

 

TimeFrameRestore();
 
//Title = EncodeColor(colorWhite)+ "CAMARILLA LEVELS" + " - " +  Name() + " - " + EncodeColor(colorWhite)+ Interval(2) + EncodeColor(colorWhite) +
 "  - " + Date() +" - "
//+ WriteIf(Col_action==colorGreen, EncodeColor(colorGreen)+"stay LONG","")+ WriteIf(Col_action==colorRed, EncodeColor(colorRed)+"stay SHORT","")+  WriteIf(Col_action==colorBlack, EncodeColor(colorYellow)+"No Trend","")+"\n"
+ "Vol= "+ WriteVal(V) +WriteIf ( V > MA(V,26) ,EncodeColor(colorWhite)+"  UP "+ (V/MA(V,26))*100 + " %", EncodeColor(colorWhite)+"  DOWN "+ (V/MA(V,26))*100 + " %")
+ EncodeColor(colorWhite)+   "\n H4: "+ EncodeColor(colorWhite)+H4
+ EncodeColor(colorWhite)+   "\n H3: "+ EncodeColor(colorWhite)+H3
+ EncodeColor(colorWhite)+   "\n L3: "+ EncodeColor(colorWhite)+L3
+ EncodeColor(colorWhite)+   "\n L4: "+ EncodeColor(colorWhite)+L4;
_SECTION_END();