Advanced Price Action Indicator

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

Advanced Price Action Indicator

Postby EZB-Schmarotzer » Tue Oct 29, 2019 11:56 am

Dear Sir,

could you please convert the following code from ProRealtime language into MQL 4?


Thanks a lot in advance


//Advanced Price Action Indicator


Once p=21 //Please add as a variable
Once BarsAfter=1
Once BarsBefore=1

BarLookBack = BarsAfter + 1
IF low[BarsAfter] < lowest[BarsBefore](low)[BarLookBack] THEN
IF low[BarsAfter] = lowest[BarLookBack](low) THEN
sup=sup + 1
ENDIF
ENDIF
IF high[BarsAfter] > highest[BarsBefore](high)[BarLookBack] THEN
IF high[BarsAfter] = highest[BarLookBack](high) THEN
res=res + 1
ENDIF
ENDIF

rsup = (sup - sup[p-1])*2
rres = (res - res[p-1])*2
tot = (rsup + rres)/2
ata = ((res + sup)/barindex)*p

tt = weightedaverage[p](rsup)
pp = weightedaverage[p](rres)
pt = weightedaverage[p](tot)

ttperc = ((tt/ata)*100)-100
ppperc = ((pp/ata)*100)-100
ptperc = ((pt/ata)*100)-100

return ttperc coloured(128,0,0) as "APAI", ppperc coloured(0,128,0) as "P APAI", ptperc coloured(0,0,255) as "APAI Main",0
EZB-Schmarotzer
 
Posts: 17
Joined: Mon Oct 28, 2019 10:00 am

Re: Advanced Price Action Indicator

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

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