Coding help - page 169

 

Thanks Mladen

if smoothed momentum=smooth RSI (I can do it in PRT no problem)

But what do you call "absolute" momentum if

RSX=(smooth RSI)/(Smooth absolute RSI)

I hope I have well understand

Thanks

Zilliq

 
zilliq:
Thanks Mladen

if smoothed momentum=smooth RSI (I can do it in PRT no problem)

But what do you call "absolute" momentum if

RSX=(smooth RSI)/(Smooth absolute RSI)

I hope I have well understand

Thanks

Zilliq

Zilliq

I did not tell "smooth RSI" nor "smooth absolute RSI"

What I told is that it is a "ratio of smoothed momentum and smoothed absolute momentum" (btw : RSI, by definition, belongs to a momentum family of indicators).

You can find a line in the rsx calculation that is saying in one part "MathAbs(mom)". That is the absolute momentum - it never goes under 0 except as a result of a smoothing lag or "undershooting" (which is rare)

 

Zilliq

Take a look at the indicator at this post : https://www.mql5.com/en/forum/178733/page36 . It will clarify what and how is used when any type of rsi is calculated

regards

 

Thanks a lot Mladen, it's very nice

I will see that and see what I can do on PRT

Have a good night

Zilliq

 

Ok I see your RSI experiment and I think I understand your code

If it can help someone here is a interesting article on RSI and how it can be calculate

http://forum.vtsystems.com/index.php?act=Attach&type=post&id=1517

Now I need to code a smooth momentum

Thanks a lot Mladen for the explanations

Zilliq

Files:
 

Hi Mladen and friends here

Please forgive me and let me know straightly if i'm disturbing you with the issue related to define POC and VA values for a Target band based on given Market profile. May I go ahead and go on with sharing my specific problems of this issue here?

By this message, i want to inform about my trials (failure till now) and call for help to identify my coding mistake. Please check the logic of my coding inside the attached indicator (I set parameters specifically to apply on chart M15-EURUSD, for my convenience during testing).

Based on comment information, I found it so strange the difference between TB_POCCount (MaxCount = 34) and TB_TotalCount (> 1million) while there're only 400 pointstep. I've check again and again but can't explain why.

I've also try the assumption of a reasonal TB_TotalCount to test my logic in coding to find VAH & VAL. It's also fail. And the worst is i can't identify where's my mistake !!!

Thanks again for your consideration. Wishing to have your kind advices !

fareastol

 
fareastol:
Hi Mladen and friends here

Please forgive me and let me know straightly if i'm disturbing you with the issue related to define POC and VA values for a Target band based on given Market profile. May I go ahead and go on with sharing my specific problems of this issue here?

By this message, i want to inform about my trials (failure till now) and call for help to identify my coding mistake. Please check the logic of my coding inside the attached indicator (I set parameters specifically to apply on chart M15-EURUSD, for my convenience during testing).

Based on comment information, I found it so strange the difference between TB_POCCount (MaxCount = 34) and TB_TotalCount (> 1million) while there're only 400 pointstep. I've check again and again but can't explain why.

I've also try the assumption of a reasonal TB_TotalCount to test my logic in coding to find VAH & VAL. It's also fail. And the worst is i can't identify where's my mistake !!!

Thanks again for your consideration. Wishing to have your kind advices !

fareastol

fareastol

Can you explain exactly what are you trying to count in the TB_TotalCount variable?

_______________________

PS: an average point step count for an 1 hour chart is somewhere between 3 and 4000 (since it depends of highest high and lowes low for the MAX_HISTORY period)

 

Hi Mladen

Thanks for your kind consideration.

I use TB_TotalCount to count total frequency on each specific price of all price levels within TargetBand (range of 1.35450 to 1.35850 in sample trial ~ 400 pointstep of price). This number would then be used to calculate Value Area (VA)'s total count, by given ratio 70% of total frequency of TargetBand.

To find VA High/Low, my logic is use the POC price as central point, then count up/down in both direction of this specific level with variables upPOC and dnPOC, then gradually integrate frequency of price at each count-step into VAcount until filling up VA's TotalCount mentioned above.

 
fareastol:
Hi Mladen

Thanks for your kind consideration.

I use TB_TotalCount to count total frequency on each specific price of all price levels within TargetBand (range of 1.35450 to 1.35850 in sample trial ~ 400 pointstep of price). This number would then be used to calculate Value Area (VA)'s total count, by given ratio 70% of total frequency of TargetBand.

To find VA High/Low, my logic is use the POC price as central point, then count up/down in both direction of this specific level with variables upPOC and dnPOC, then gradually integrate frequency of price at each count-step into VAcount until filling up VA's TotalCount mentioned above.

fareastol

try removing this part :

for(j=0, n=TB_LL; j<Target_band; j++, n++)

{

TBCount[j] = Count[n];

TB_TotalCount += TBCount[j];

TB_VACount = MathRound(0.7 * TB_TotalCount);

nPOC = ArrayMaximum(TBCount);

TB_POC = TargetL + nPOC*PointStep;

TB_POCCount = TBCount[nPOC];

}

out of the " for (i=1; i < History; i++)" loop (you are having a loop within a loop)

 

Hi Mladen,

I succeed using the relative and absolute momentum

Thanks a lot for your help, now I need to smooth the momentum for the rsx

Zilliq

Ps: If it can help someone:

//Relative Momentum on close

ind1= close-close[1]

// Absolute momentum

ind2=abs(ind1)

ind3=wilderAverage[rs](ind1)

ind4=wilderAverage[rs](ind2)

ind3=(50*(ind3+ind4))/ind4

return ind3 as "RSI",0, 30, 70, 100

Files:
Reason: