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
IF high[BarsAfter] > highest[BarsBefore](high)[BarLookBack] THEN
IF high[BarsAfter] = highest[BarLookBack](high) THEN
res=res + 1

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
Posts: 23
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
FXCodeBase: Confirmed User
Posts: 26196
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Return to Indicator and Signal Requests

Who is online

Users browsing this forum: wuhuilin11 and 8 guests