Help Coding A Straight Envelope in ProRealTime Please

tradingjamie

Newbie
Messages
4
Likes
0
Hello All,

Would anyone be able to help me coding a straight envelope in prorealtime please.

Essentially, the code I have so far is:

Code:
myEma= exponentialaverage[21](close)

upperband = myEma +(myEma * COEFF)
lowerband = myEma -(myEma * COEFF)

return upperband,lowerband

where COEFF (the coefficient) is a user defined variable, which I set to default to 0.05

Now the problem is that 0.05 doesn't work for all stocks - so that I find for some stocks I need to manually adjust COEFF to make the envelope fit the stock properly (i.e. the envelope touches the highest high made in the past 3 months, or lowest low)

Does anyone know how to do this?

Thanks
 
Hello All,

Would anyone be able to help me coding a straight envelope in prorealtime please.

Essentially, the code I have so far is:

Code:
myEma= exponentialaverage[21](close)

upperband = myEma +(myEma * COEFF)
lowerband = myEma -(myEma * COEFF)

return upperband,lowerband

where COEFF (the coefficient) is a user defined variable, which I set to default to 0.05

Now the problem is that 0.05 doesn't work for all stocks - so that I find for some stocks I need to manually adjust COEFF to make the envelope fit the stock properly (i.e. the envelope touches the highest high made in the past 3 months, or lowest low)

Does anyone know how to do this?

Thanks

Hi Jamie,

Just log onto the Prorealtime site as they will code this for free for you. I asked them to do a BB Squeeze a while back and they did it no problems. If you need this let me know and i'll dig it out for you

ProRealTime: Financial Technical Analysis Software & Real-Time Market Data

They also have loads of strategies and indicators already coded

ProRealTime: Financial Technical Analysis Software & Real-Time Market Data

Ged
 
Top