Converting the following indicator from Amibroker AFL to either MQ4 or MQL5.

MQL5 Konvertierung

Spezifikation

Hi friends,

I am very new to trading. Someone kindly help me converting the following indicator from Amibroker AFL to either MQ4 or MQL5. I found it on internet. Could not find Simon who coded it originally but big thanks to him.

Thanks in advance.

//--------- CPR ---------//
//Coded By: SIMSON//

_SECTION_BEGIN( "CPR" );
dtDayStartComp = TimeFrameCompress( DateTime(), inDaily, compressOpen );
dtDayStartExp = TimeFrameExpand( dtDayStartComp, inDaily, expandFirst );
dtDayEndComp = TimeFrameCompress( DateTime(), inDaily, compressLast );
dtDayEndExp = TimeFrameExpand( dtDayEndComp, inDaily, expandFirst );
DayCond = DateTime() >= dtDayStartExp AND DateTime() < dtDayEndExp;

//Levels Settings (Shown / Hidden)//
/*
DCPR = ParamToggle( "Daily CPR", "Shown|Hidden", 0 );
WCPR = ParamToggle( "Weekly CPR", "Shown|Hidden", 0 );
MCPR = ParamToggle( "Monthly CPR", "Shown|Hidden", 0 );
*/
TCPR = ParamToggle( "Tomorrow CPR", "Shown|Hidden", 1 );

DRE4 = ParamToggle( "Daily R4", "Shown|Hidden", 1 );
DRE3 = ParamToggle( "Daily R3", "Shown|Hidden", 1 );
DRE2 = ParamToggle( "Daily R2", "Shown|Hidden", 1 );
DRE1 = ParamToggle( "Daily R1", "Shown|Hidden", 0 );
DCUB = ParamToggle( "Daily UB", "Shown|Hidden", 0 );
DCPV = ParamToggle( "Daily PV", "Shown|Hidden", 0 );
DCLB = ParamToggle( "Daily LB", "Shown|Hidden", 0 );
DSU1 = ParamToggle( "Daily S1", "Shown|Hidden", 0 );
DSU2 = ParamToggle( "Daily S2", "Shown|Hidden", 1 );
DSU3 = ParamToggle( "Daily S3", "Shown|Hidden", 1 );
DSU4 = ParamToggle( "Daily S4", "Shown|Hidden", 1 );
DH = ParamToggle( "Previous Day High", "Shown|Hidden", 0 );
DL = ParamToggle( "Previous Day Low", "Shown|Hidden", 0 );

WRE3 = ParamToggle( "Weekly R3", "Shown|Hidden", 1 );
WRE2 = ParamToggle( "Weekly R2", "Shown|Hidden", 1 );
WRE1 = ParamToggle( "Weekly R1", "Shown|Hidden", 1 );
WCUB = ParamToggle( "Weekly UB", "Shown|Hidden", 1 );
WCPV = ParamToggle( "Weekly PV", "Shown|Hidden", 1 );
WCLB = ParamToggle( "Weekly LB", "Shown|Hidden", 1 );
WSU1 = ParamToggle( "Weekly S1", "Shown|Hidden", 1 );
WSU2 = ParamToggle( "Weekly S2", "Shown|Hidden", 1 );
WSU3 = ParamToggle( "Weekly S3", "Shown|Hidden", 1 );
WH = ParamToggle( "Previous Week High", "Shown|Hidden", 1 );
WL = ParamToggle( "Previous Week Low", "Shown|Hidden", 1 );

MRE3 = ParamToggle( "Monttly R3", "Shown|Hidden", 1 );
MRE2 = ParamToggle( "Monttly R2", "Shown|Hidden", 1 );
MRE1 = ParamToggle( "Monttly R1", "Shown|Hidden", 1 );
MCUB = ParamToggle( "Monttly UB", "Shown|Hidden", 1 );
MCPV = ParamToggle( "Monttly PV", "Shown|Hidden", 1 );
MCLB = ParamToggle( "Monttly LB", "Shown|Hidden", 1 );
MSU1 = ParamToggle( "Monttly S1", "Shown|Hidden", 1 );
MSU2 = ParamToggle( "Monttly S2", "Shown|Hidden", 1 );
MSU3 = ParamToggle( "Monttly S3", "Shown|Hidden", 1 );
MH = ParamToggle( "Previous Month High", "Shown|Hidden", 1 );
ML = ParamToggle( "Previous Month Low", "Shown|Hidden", 1 );

// Current Day High Low Close
CDH = TimeFrameGetPrice( "H", inDaily, 0 );
CDL = TimeFrameGetPrice( "L", inDaily, 0 );
CDC = TimeFrameGetPrice( "C", inDaily, 0 );
// Previous Days High Low Close
PDH = TimeFrameGetPrice( "H", inDaily, -1 );
PDL = TimeFrameGetPrice( "L", inDaily, -1 );
PDC = TimeFrameGetPrice( "C", inDaily, -1 );
// Previous Weeks High Low Close
PWH = TimeFrameGetPrice( "H", inWeekly, -1 );
PWL = TimeFrameGetPrice( "L", inWeekly, -1 );
PWC = TimeFrameGetPrice( "C", inWeekly, -1 );
// Previous Months High Low Close
PMH = TimeFrameGetPrice( "H", inMonthly, -1 );
PML = TimeFrameGetPrice( "L", inMonthly, -1 );
PMC = TimeFrameGetPrice( "C", inMonthly, -1 );
// Daily CPR
PV = ( PDH + PDL + PDC ) / 3;
LB = ( PDH + PDL ) / 2;
UB = ( PV - LB ) + PV ;
// Weekly CPR
WPV = ( PWH + PWL + PWC ) / 3;
WLB = ( PWH + PWL ) / 2;
WUB = ( WPV - WLB ) + WPV;
// Monthly CPR
MPV = ( PMH + PML + PMC ) / 3;
MLB = ( PMH + PML ) / 2;
MUB = ( MPV - MLB ) + MPV;
// Daily Resistence & Supports
R1 = 2 * PV - PDL;
R2 = PV + ( PDH - PDL );
R3 = R1 + ( PDH - PDL );
R4 = R3 + ( R2 - R1);
S1 = 2 * PV - PDH;
S2 = PV - ( PDH - PDL );
S3 = S1 - ( PDH - PDL );
S4 = S3 - ( S1 - S2 );
// Weekly Resistence & Supports
WR1 = 2 * WPV - PWL;
WR2 = WPV + ( PWH - PWL );
WR3 = WR1 + ( PWH - PWL );
WR4 = WR3 + ( WR2 - WR1);
WS1 = 2 * WPV - PWH;
WS2 = WPV - ( PWH - PWL );
WS3 = WS1 - ( PWH - PWL );
WS4 = WS3 - ( WS1 - WS2 );
// Monthly Resistence & Supports
MR1 = 2 * MPV - PML;
MR2 = MPV + ( PMH - PML );
MR3 = MR1 + ( PDH - PML );
MR4 = MR3 + ( MR2 - MR1);
MS1 = 2 * MPV - PMH;
MS2 = MPV - ( PMH - PML );
MS3 = MS1 - ( PMH - PML );
MS4 = MS3 - ( MS1 - MS2 );

numbars = LastValue( Cum( Status( "barvisible" ) ) );
hts = -50;

_SECTION_BEGIN( "DAILY CPR" );
if ( DH == 0 )
{
Plot( IIf( DayCond, PDH, Null ), "PDH", colorYellow, styleLine, Null, Null, 2 );
PlotText( "PDH = "+PDH , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(PDH), colorYellow );
}
if ( DL == 0 )
{
Plot( IIf( DayCond, PDL, Null ), "PDL", colorYellow, styleLine, Null, Null, 2 );
PlotText( "PDL = "+PDL , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(PDL), colorYellow );
}
if ( DCUB == 0 )
{
Plot( IIf( DayCond, UB, Null ), "UB", colorAqua, styleLine, Null, Null, 2 );
PlotText( "UB = "+UB , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(UB), colorAqua );
}
if ( DCPV == 0 )
{
Plot( IIf( DayCond, PV, Null ), "Pivot", colorAqua, styleLine, Null, Null, 2 );
PlotText( "PV = "+PV , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(PV), colorAqua );
}
if ( DCLB == 0 )
{
Plot( IIf( DayCond, LB, Null ), "LB", colorAqua, styleLine, Null, Null, 2 );
PlotText( "LB = "+LB , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(LB), colorAqua );
}

if ( DRE1 == 0 )
{
Plot( IIf( DayCond, R1, Null ), "R1", colorLime, styleLine, Null, Null, 2 );
PlotText( "R1 = "+R1 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(R1), colorLime );
}
if ( DRE2 == 0 )
{
Plot( IIf( DayCond, R2, Null ), "R2", colorLime, styleLine, Null, Null, 2 );
PlotText( "R2 = "+R2 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(R2), colorLime );
}
if ( DRE3 == 0 )
{
Plot( IIf( DayCond, R3, Null ), "R3", colorLime, styleLine, Null, Null, 2 );
PlotText( "R3 = "+R3 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(R3), colorLime );
}
if ( DRE4 == 0 )
{
Plot( IIf( DayCond, R4, Null ), "R4", colorLime, styleLine, Null, Null, 2 );
PlotText( "R4 = "+R4 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(R4), colorLime );
}
if ( DSU1 == 0 )
{
Plot( IIf( DayCond, S1, Null ), "S1", colorOrange, styleLine, Null, Null, 2 );
PlotText( "S1 = "+S1 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(S1), colorOrange );
}
if ( DSU2 == 0 )
{
Plot( IIf( DayCond, S2, Null ), "S2", colorOrange, styleLine, Null, Null, 2 );
PlotText( "S2 = "+S2 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(S2), colorOrange );
}
if ( DSU3 == 0 )
{
Plot( IIf( DayCond, S3, Null ), "S3", colorOrange, styleLine, Null, Null, 2 );
PlotText( "S3 = "+S3 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(S3), colorOrange );
}
if ( DSU4 == 0 )
{
Plot( IIf( DayCond, S4, Null ), "S4", colorOrange, styleLine, Null, Null, 2 );
PlotText( "S4 = "+S4 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(S4), colorOrange );
}
_SECTION_END();

_SECTION_BEGIN( "WEEKLY CPR" );
if ( WH == 0 )
{
Plot( IIf( DayCond, PWH, Null ), "PWH", colorYellow, styleLine, Null, Null, 2 );
PlotText( "PWH = "+PWH , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(PWH), colorYellow );
}
if ( WL == 0 )
{
Plot( IIf( DayCond, PWL, Null ), "PWL", colorYellow, styleLine, Null, Null, 2 );
PlotText( "PWL = "+PWL , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(PWL), colorYellow );
}
if ( WCUB == 0 )
{
Plot( IIf( DayCond, WUB, Null ), "WCUB", colorAqua, styleDots, Null, Null, 2 );
PlotText( "WCUB = "+WUB , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(WUB), colorAqua );
}
if ( WCPV == 0 )
{
Plot( IIf( DayCond, WPV, Null ), "WCPV", colorAqua, styleDots, Null, Null, 2 );
PlotText( "WCPV = "+WPV , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(WPV), colorAqua );
}
if ( WCLB == 0 )
{
Plot( IIf( DayCond, WLB, Null ), "WCLB", colorAqua, styleDots, Null, Null, 2 );
PlotText( "WCLB = "+WLB , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(WLB), colorAqua );
}

if ( WRE1 == 0 )
{
Plot( IIf( DayCond, WR1, Null ), "WR1", colorLime, styleDots, Null, Null, 2 );
PlotText( "WR1 = "+WR1 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(WR1), colorLime );
}
if ( WRE2 == 0 )
{
Plot( IIf( DayCond, WR2, Null ), "WR2", colorLime, styleDots, Null, Null, 2 );
PlotText( "WR2 = "+WR2 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(WR2), colorLime );
}
if ( WRE3 == 0 )
{
Plot( IIf( DayCond, WR3, Null ), "WR3", colorLime, styleDots, Null, Null, 2 );
PlotText( "WR3 = "+WR3 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(WR3), colorLime );
}
if ( WSU1 == 0 )
{
Plot( IIf( DayCond, WS1, Null ), "WS1", colorOrange, styleDots, Null, Null, 2 );
PlotText( "WS1 = "+WS1 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(WS1), colorOrange );
}
if ( WSU2 == 0 )
{
Plot( IIf( DayCond, WS2, Null ), "WS2", colorOrange, styleDots, Null, Null, 2 );
PlotText( "WS2 = "+WS2 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(WS2), colorOrange );
}
if ( WSU3 == 0 )
{
Plot( IIf( DayCond, WS3, Null ), "WS3", colorOrange, styleDots, Null, Null, 2 );
PlotText( "WS3 = "+WS3 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(WS3), colorOrange );
}
_SECTION_END();

_SECTION_BEGIN( "MONTHLY CPR" );
if ( MH == 0 )
{
Plot( IIf( DayCond, PMH, Null ), "PMH", colorYellow, styleLine, Null, Null, 2 );
PlotText( "PMH = "+PMH , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(PMH), colorYellow );
}
if ( ML == 0 )
{
Plot( IIf( DayCond, PML, Null ), "PML", colorYellow, styleLine, Null, Null, 2 );
PlotText( "PML = "+PML , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(PML), colorYellow );
}
if ( MCUB == 0 )
{
Plot( IIf( DayCond, MUB, Null ), "MCUB", colorAqua, styleDashed, Null, Null, 2 );
PlotText( "MCUB = "+MUB , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(MUB), colorAqua );
}
if ( MCPV == 0 )
{
Plot( IIf( DayCond, MPV, Null ), "MCPV", colorAqua, styleDashed, Null, Null, 2 );
PlotText( "MCPV = "+MPV , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(MPV), colorAqua );
}
if ( MCLB == 0 )
{
Plot( IIf( DayCond, MLB, Null ), "MCLB", colorAqua, styleDashed, Null, Null, 2 );
PlotText( "MCLB = "+MLB , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(MLB), colorAqua );
}

if ( MRE1 == 0 )
{
Plot( IIf( DayCond, MR1, Null ), "MR1", colorLime, styleDashed, Null, Null, 2 );
PlotText( "MR1 = "+MR1 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(MR1), colorLime );
}
if ( MRE2 == 0 )
{
Plot( IIf( DayCond, MR2, Null ), "MR2", colorLime, styleDashed, Null, Null, 2 );
PlotText( "MR2 = "+MR2 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(MR2), colorLime );
}
if ( MRE3 == 0 )
{
Plot( IIf( DayCond, MR3, Null ), "MR3", colorLime, styleDashed, Null, Null, 2 );
PlotText( "MR3 = "+MR3 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(MR3), colorLime );
}
if ( MSU1 == 0 )
{
Plot( IIf( DayCond, MS1, Null ), "MS1", colorOrange, styleDashed, Null, Null, 2 );
PlotText( "MS1 = "+MS1 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(MS1), colorOrange );
}
if ( MSU2 == 0 )
{
Plot( IIf( DayCond, MS2, Null ), "MS2", colorOrange, styleDashed, Null, Null, 2 );
PlotText( "MS2 = "+MS2 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(MS2), colorOrange );
}
if ( MSU3 == 0 )
{
Plot( IIf( DayCond, MS3, Null ), "MS3", colorOrange, styleDashed, Null, Null, 2 );
PlotText( "MS3 = "+MS3 , LastValue( BarIndex() ) - ( numbars / Hts ), LastValue(MS3), colorOrange );
}
_SECTION_END();

_SECTION_END();

_SECTION_BEGIN( "NEXT DAY" );
if ( TCPR == 0 )
{
shift = 10; //Number of Bars to be shifted, could use a Param if needed
bi = BarIndex();
lvbi = LastValue( bi );
LAx0 = lvbi - shift + 1;
LAx1 = lvbi;

// Present Days High Low Close
// These levels will be dynamic as day progresses and would ahow up in the no bar region after the last visible Bar for shifted number of bars (i.e. 10 in this case)
// Do use "Bar Replay" to figure out what I mean
dH = TimeFrameGetPrice( "H", inDaily, 0 );
dL = TimeFrameGetPrice( "L", inDaily, 0 );
dC = TimeFrameGetPrice( "C", inDaily, 0 );

//Central Pivots shifted for Next Day
dPV = ( dH + dL + dC ) / 3;
LB = ( dH + dL ) / 2;
UB = 2 * dPV - LB;

y = LastValue( dPV );
la = LineArray( LAx0, y, LAx1, y );
Plot( la, "PV", colorAqua, styleThick, Null, Null, shift );

y = LastValue( LB );
la = LineArray( LAx0, y, LAx1, y );
Plot( la, "LB", colorAqua, styleThick, Null, Null, shift );

y = LastValue( UB );
la = LineArray( LAx0, y, LAx1, y );
Plot( la, "UB", colorAqua, styleThick, Null, Null, shift );

//Pivot Levels shifted for Next Day
R1 = 2 * dPV - dL;
R2 = dPV + dH - dL;
S1 = 2 * dPV - dH;
S2 = dPV - dH + dL;

y = LastValue( R1 );
la = LineArray( LAx0, y, LAx1, y );
Plot( la, "R1", colorOrange, styleThick, Null, Null, shift );

y = LastValue( R2 );
la = LineArray( LAx0, y, LAx1, y );
Plot( la, "R2", colorOrange, styleThick, Null, Null, shift );

y = LastValue( S1 );
la = LineArray( LAx0, y, LAx1, y );
Plot( la, "S1", colorLime, styleThick, Null, Null, shift );

y = LastValue( S2 );
la = LineArray( LAx0, y, LAx1, y );
Plot( la, "S2", colorLime, styleThick, Null, Null, shift );
}
_SECTION_END();

Bewerbungen

1
Entwickler 1
Bewertung
(36)
Projekte
35
40%
Schlichtung
12
17% / 50%
Frist nicht eingehalten
2
6%
Frei
2
Entwickler 2
Bewertung
(129)
Projekte
208
54%
Schlichtung
21
24% / 52%
Frist nicht eingehalten
64
31%
Frei
3
Entwickler 3
Bewertung
(137)
Projekte
167
35%
Schlichtung
11
91% / 0%
Frist nicht eingehalten
0
Frei
4
Entwickler 4
Bewertung
(549)
Projekte
826
73%
Schlichtung
15
53% / 13%
Frist nicht eingehalten
193
23%
Frei
5
Entwickler 5
Bewertung
(26)
Projekte
23
39%
Schlichtung
26
8% / 38%
Frist nicht eingehalten
0
Frei
6
Entwickler 6
Bewertung
(41)
Projekte
88
14%
Schlichtung
30
30% / 53%
Frist nicht eingehalten
36
41%
Arbeitet
Ähnliche Aufträge
Dear Developer's I hope this message finds you well. I am seeking your expertise to update an MT4 EA server to the latest MT4 build 1420 or higher. Additionally, I would like to convert the EA to be compatible with MT5. Please let me know your availability and the estimated cost for this project. I look forward to your prompt response. Thank you
Greetings great developer, I am in search of a highly skilled developer to assist with an exciting project. I need to convert two open-source TradingView indicators to NinjaTrader 8 and implement a usage restriction based on computer IDs. If you have experience with NinjaTrader 8 coding please let me know. I’d be happy to discuss the details further
Greetings great developer, I am in search of a highly skilled MQL5 developer to assist with an exciting project. I need to convert two open-source TradingView indicators to NinjaTrader 8 and implement a usage restriction based on computer IDs. If you have experience with NinjaTrader 8 coding please let me know. I’d be happy to discuss the details further
Hi, I am looking for someone who can code a auto lot size calculator for cTrader - where I can drag stop loss line and the algo automatically calculates the lot size I need to place a trade with a fixed % risk of account. It also needs to show the lot size and est. margin on screen before entering and needs to execute market and limit orders. It must work on FX, Commodities, Indices, Stocks and Crypto. With options
Hello everyone, I am looking for a programmer experienced in converting Pine Script to MQL5. This project involves converting a trading strategy written in Pine Script on TradingView to MQL5 for MetaTrader 5. You can find the code in the link below: https://drive.google.com/file/d/16DvtlQlJYxZfaHRL6AHZV8Z0D7M9bg_j/view?usp=drivesdk Budget: 30USD
Specification for Translating Pine Script Indicators to MQL5 Objective Translate multiple indicators written in Pine Script into MQL5. The translation should be implemented using an object-oriented and class-based approach. Additionally, the indicators should include some specific adjustments as detailed below. Requirements Object-Oriented Design Implement the indicators using an object-oriented paradigm in MQL5
I'm looking to take my Tradingview Indicator and convert it to be used on Ninja Trader 8. I will be the only one using it and will not be made public, but I want to use it so I can trade using it live and also in replaying past data on NT8. Its just an indicator that places certain Goldbach lines on the chart based on a selection in the menu. So, its not a Bot, but an indicator. I have attached the script below so
I have a MetaTrader 4 indicator that I programmed to give arrow signals at entry and exit. What is required, is it possible to program the indicator to be better developed so that it gives a written purchase or sale, not just shares, and also gives the phrase (adjustment zone 1 and amendment 2) when the transaction is reversed, and finally, is it possible for the indicator to change the candles so that when the
Hello, I am looking for someone to convert my well defined MQL4 code project to MQL5 (EAs) A brief description of my current strategy: MT4 'Spreadsheet' EA collects data from 28 FX currency pairs -> sends it to Excel, then Excel calculates and makes a decision -> Excel sends a signal to MT4 'Trading' EA and manages trades I want the MT4 EA to be converted into MT5. For Back testing purposes, I want to withdraw from
hi. I hv a strategy on tradingview need to convert to MT4/MT5 expert advisor for algo trading. would like to add some tradingview strategy setting to the EA(not included in my tradingview code): recalculate after order is filled, order size: xx% of equity

Projektdetails

Budget
30 - 200 USD
Für die Entwickler
27 - 180 USD
Ausführungsfristen
bis 10 Tag(e)