Forex Factory (https://www.forexfactory.com/)
-   Platform Tech (https://www.forexfactory.com/forum/69-platform-tech)
-   -   convert MT4 indicator to CTrader (https://www.forexfactory.com/thread/978924-convert-mt4-indicator-to-ctrader)

Suran Feb 5, 2020 9:35am | Post# 1

convert MT4 indicator to CTrader
 
2 Attachment(s)
Hi can anybody help me to convert this mt4 moving average fill indicator to ctrader.

I found how to convert to source code to C but do not know how to convert it to a ctrader indicator.

much appreciated
MA ribbon filled 2 x 14.ex4
MA ribbon filled 2 x 14.mq4

sangnt0904 Feb 5, 2020 11:04am | Post# 2

1 Attachment(s)
Hello Suran!
I hope this video helps you!
I am a big fan of PASR.

Sang,
MAribbon_Indicator.mp4

value_ Feb 5, 2020 3:03pm | Post# 3

I don't know if that helps, but take a look at this:

http://2calgo.com/

Suran Feb 6, 2020 10:26am | Post# 4

Hello Suran! I hope this video helps you! I am a big fan of PASR. Sang, {file}

Thanks a lot mate. much appreciated

sangnt0904 Feb 6, 2020 10:09pm | Post# 5

{quote} Thanks a lot mate. much appreciated
Not at all! If you still have any problems sending me messages, I would love to help others.
Sang,

Suran Feb 7, 2020 4:37am | Post# 6

I don't know if that helps, but take a look at this: http://2calgo.com/
I went through this. its doing half the job.thanks

equa Feb 9, 2020 4:34am | Post# 7

Hi
Good work!
Looks like we're getting there, but not quite that clean, mean look in MT4 yet.

I noticed that in the recent update to Ctrader 3.7 that there are new programming features that may allow proper coding of the Strat Shadow. There are a few new MA indicators on the Ctrader site already. Hopefully it won't be long now.

I'll test some of them over the coming days and see if there are any that can be modified by the makers into a proper Strat Shadow. Stay tuned.

Cheers

equa Feb 9, 2020 4:55pm | Post# 8

1 Attachment(s)
Hi
This is the GMMA (or GuppY) indicator from Ctrader/indicators. The Guppy is only the light coloured ema's inbetween the standard 20, 72, and 200 emas built-in to the Ctrader platform.

download link
https://ctrader.com/algos/indicators/show/678

Click to Enlarge

Name: Image1.png
Size: 77 KB

Not great but it's a start and better than nothing imo

equa Feb 9, 2020 7:33pm | Post# 9

1 Attachment(s)
Now with up/down colouring on the 72 ema and a better ema ribbon for the filling lines

Click to Enlarge

Name: Image1.png
Size: 61 KB

Still not great but it'll have to do for now

link ema
https://ctrader.com/algos/indicators/show/2114

link ema ribbon
https://ctrader.com/algos/indicators/show/28

iman45 May 27, 2020 6:54am | Post# 10

https://ct.icmarkets.com/copy/strategy/8032

iyan.srvc Jul 2, 2020 10:56pm | Post# 11

Hi mr.Suran,
i'm also looking for someone who can help convert the MQ4 indicator to cTrader.
i try convert indicator Davit pivot v3.2 to Calgo online from here :
http://mq4tocalgo.apphb.com
and Result get 9 errors,
===============================================
mybe errors this block :

if (brokercandle == true)
{
ObjectDelete("Start");
ObjectDelete("End");
switch (swaptf)
{
case 1:
chose_tf = PERIOD_M1;
break;
case 2:
chose_tf = PERIOD_W1;
break;
case 3:
chose_tf = PERIOD_D1;
break;
}
wclose = iClose(Symbol.Code, chose_tf, 1);
wopen = iClose(Symbol.Code, chose_tf, 1);
whigh = iHigh(Symbol.Code, chose_tf, 1);
wlow = iLow(Symbol.Code, chose_tf, 1);
}
else if (brokercandle == false)
{
ObjectDelete("Start");
ObjectDelete("End");
BarShft_Start = iBarShift(Symbol.Code, PERIOD_H1, weekOpen);
BarShft_End = iBarShift(Symbol.Code, PERIOD_H1, weekClose);
wopen = iOpen(Symbol.Code, PERIOD_H1, BarShft_Start);
wclose = iClose(Symbol.Code, PERIOD_H1, BarShft_End);
HighBar = iHighest(Symbol.Code, PERIOD_H1, MODE_HIGH, BarShft_Start - BarShft_End + 1, BarShft_End);
LowBar = iLowest(Symbol.Code, PERIOD_H1, MODE_LOW, BarShft_Start - BarShft_End + 1, BarShft_End);
whigh = iHigh(Symbol.Code, PERIOD_H1, HighBar);
wlow = iLow(Symbol.Code, PERIOD_H1, LowBar);

if (BarShft_Start < BarShft_End)
{
Alert("Error - Start time must be less than End time!");
}
if (StartEndLines == true)
{
ObjectCreate(0, "Start", OBJ_VLINE, 0, weekOpen, 0);
ObjectSetInteger(0, "Start", OBJPROP_COLOR, clrLimeGreen);
ObjectSetInteger(0, "Start", OBJPROP_WIDTH, 0);
ObjectSetInteger(0, "Start", OBJPROP_STYLE, 2);

ObjectCreate(0, "End", OBJ_VLINE, 0, weekClose, 0);
ObjectSetInteger(0, "End", OBJPROP_COLOR, clrTomato);
ObjectSetInteger(0, "End", OBJPROP_WIDTH, 0);
ObjectSetInteger(0, "End", OBJPROP_STYLE, 2);
}

[Parameter("comment1", DefaultValue = "Choose the TF ")]
public string comment1_parameter { get; set; }
bool _comment1Got;
Mq4String comment1_backfield;
Mq4String comment1
{
get
{
if (!_comment1Got)
comment1_backfield = comment1_parameter;
return comment1_backfield;
}
set { comment1_backfield = value; }
}

[Parameter("comment2", DefaultValue = "Choose Pivot Method ")]
public string comment2_parameter { get; set; }
bool _comment2Got;
Mq4String comment2_backfield;
Mq4String comment2
{
get
{
if (!_comment2Got)
comment2_backfield = comment2_parameter;
return comment2_backfield;
}
set { comment2_backfield = value; }
}


============================================

enum TFOfPivot
{
M1 = 1,
W1 = 2,
D1 = 3
}

input TFOfPivotSwaptf = 2;


enum PivotMethod
{
HLC = 1,
HLCC = 2,
HLOC = 3,
HLOO = 4,
HLO = 5
}

input PivotMethod = 1;



Error CS1519: Invalid token '=' in class, struct, or interface member declaration

can any body fix this error ?
============================================


© Forex Factory