Converting a code from ProRealtime to MQL4

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Converting a code from ProRealtime to MQL4

Postby EZB-Schmarotzer » Mon Oct 28, 2019 10:05 am

Hi Apprentice :)

Before I add any requests, I'd like to ask whether you can convert codes from the language used in ProRealtime into MQL4?

ProRealtime language is based on BASIC and is easy to understand.
EZB-Schmarotzer
 
Posts: 25
Joined: Mon Oct 28, 2019 10:00 am

Re: Converting a code from ProRealtime to MQL4

Postby Apprentice » Tue Oct 29, 2019 6:30 am

Sure.
Can you provide more information?
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Converting a code from ProRealtime to MQL4

Postby EZB-Schmarotzer » Tue Oct 29, 2019 7:48 am

Excuse me Sir, I forgot to add the code.

Here it is:


// PARAMETERS
DEFPARAM CumulateOrders = False
DEFPARAM flatafter = 210000

// Stops and TPs

myTarget=5*AverageTrueRange[14](close)
myStop=1*AverageTrueRange[14](close)

// Indicators
MM = Average[200](close)
iMACD = MACD[12,26,9](close)

// Buy
ca1 = close > MM
ca2 = iMACD > 0

IF ca1 AND ca2 AND time >= 090000 THEN
BUY AT MARKET
ENDIF

// Sell
cv1 = close < MM
cv2 = iMACD < 0

IF cv1 AND cv2 AND time >= 090000 THEN
SELLSHORT AT MARKET
ENDIF

// Objectives
SET STOP LOSS myStop
SET TARGET PROFIT myTarget
EZB-Schmarotzer
 
Posts: 25
Joined: Mon Oct 28, 2019 10:00 am

Re: Converting a code from ProRealtime to MQL4

Postby EZB-Schmarotzer » Tue Oct 29, 2019 8:01 am

Hello Sir,

I just saw that you have already given a number to my request.


Sorry for doubleposting
EZB-Schmarotzer
 
Posts: 25
Joined: Mon Oct 28, 2019 10:00 am

Re: Converting a code from ProRealtime to MQL4

Postby Apprentice » Wed Oct 30, 2019 5:44 am

Your request is added to the development list.
Development reference 258.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Indicator and Signal Requests

Who is online

Users browsing this forum: No registered users and 4 guests