TMA Reverse

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

TMA Reverse

Postby EZB-Schmarotzer » Tue Dec 17, 2019 3:55 pm

Dear Sir,

could you please convert the following code from ProRealtime into an MT4 expert advisor?



---------------------

defparam cumulateorders = false

// parameters
HalfLength = 141 //please add this as a variable
AtrLength = 141 //please add this as a variable
AtrMultiplier = 2.4 //please add this as a variable

avg = average [1](close)

sum = (HalfLength+1)*avg
sumw = (HalfLength+1)
k = HalfLength

for j = 1 to HalfLength do
k = k-1
sum = sum+(k*avg[j])
sumw = sumw+k
next


myrange = AverageTrueRange[AtrLength](close)*AtrMultiplier

middleband = sum/sumw
//higherband = buffer1+myrange
lowerband = middleband-myrange
upperband = middleband+myrange


TradingDay = opendayofweek = 1 or dayofweek = 2 or dayofweek = 3 or dayofweek = 4 or dayofweek = 5

IF TradingDay then
if average [1] (close) crosses over lowerband then
buy at market
endif
Endif

if average [1] (close) crosses over middleband then
sell at market
endif

IF TradingDay then
if average [1] (close) crosses under upperband then
sellshort at market
endif
Endif

if average [1] (close) crosses under middleband then
exitshort at market
endif


set stop %loss 3
set target %profit 3 // as insurance
EZB-Schmarotzer
 
Posts: 25
Joined: Mon Oct 28, 2019 10:00 am

Re: TMA Reverse

Postby Apprentice » Wed Dec 18, 2019 4:31 pm

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


Re: TMA Reverse

Postby henryfxcodebase » Thu Jan 02, 2020 7:09 am

Dear Apprentice,I humbly request, if this TMA Reverse could be coded in lua for TS both as indicator and strategy. thanks
henryfxcodebase
 
Posts: 10
Joined: Sat Aug 24, 2019 11:18 am

Re: TMA Reverse

Postby Apprentice » Fri Jan 03, 2020 4:04 am

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