Simple Index Trader

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

Simple Index Trader

Postby EZB-Schmarotzer » Mon Oct 28, 2019 9:49 pm

Hi everyone :)

Can you please convert this code from ProRealtime language (based on BASIC, so it's quite simple) into an MQL 4 Expert Advisor?



// 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: 17
Joined: Mon Oct 28, 2019 10:00 am

Re: Simple Index Trader

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

Your request is added to the development list.
Development reference 257.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 23231
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 10 guests