Page 22 of 158
Re: Coding Help
Posted: Sun Apr 30, 2017 4:52 pm
by Newton51
Thanks mladen. I feared this was the case. I was hoping I could assign a double max = INDICATOR_MAXIMUM etc. I'll waste no more time on this then and just manually update the values. I appreciate your prompt reply.
Re: Coding Help
Posted: Mon May 01, 2017 12:59 am
by mladen
Newton51 wrote: Sun Apr 30, 2017 4:52 pm
Thanks mladen. I feared this was the case. I was hoping I could assign a double max = INDICATOR_MAXIMUM etc. I'll waste no more time on this then and just manually update the values. I appreciate your prompt reply.
It is a pity though : one could do some good things with that
Re: Coding Help
Posted: Mon May 01, 2017 6:47 pm
by mladen
Newton51 wrote: Sun Apr 30, 2017 10:27 am
I don't see how I can edit/update my earlier query.
The problem I am trying to solve is associated with the MT4 auto-scaling.
Since posting the above, I have manually entered the scale maximum and scale minimum and get the result I am trying to measure. So my question is simply .... Is there a way to automatically capture the scale max and scale min values showing on the right side of the sub-window so I can avoid the need to periodically review/update changes in values?
I stand corrected
You can do that - see the following code - and it works in run-time too
Code: Select all
Comment("Current fixed minimum : "+(string)WindowPriceMin(WindowFind(shortName))+"\n"+
"Current fixed maximum : "+(string)WindowPriceMax(WindowFind(shortName)));
Re: Coding Help
Posted: Tue May 02, 2017 1:03 am
by traderduke
Mladen
I set this indicator up with a trendpm but I can't get it to show a 1 or -1 on the data window, it just shows blank.
Also the lines only work on current time, can you look into that?
line 301 if(rsiPriceLine
>bandMiddle) trendpm = 1;
line 302 if(rsiPriceLine<bandMiddle) trendpm = -1;
Thank you and thanks for the wave trend info apparently my test indicator which tells me which buffer is trend is bad.
Ray
Re: Coding Help
Posted: Tue May 02, 2017 1:25 am
by mladen
traderduke wrote: Tue May 02, 2017 1:03 am
Mladen
I set this indicator up with a trendpm but I can't get it to show a 1 or -1 on the data window, it just shows blank.
Also the lines only work on current time, can you look into that?
line 301 if(rsiPriceLine
>bandMiddle) trendpm = 1;
line 302 if(rsiPriceLine<bandMiddle) trendpm = -1;
Thank you and thanks for the wave trend info apparently my test indicator which tells me which buffer is trend is bad.
Ray
RK-TDI_mtf_v1.04_ALV.mq4
It is there - no changes in code made at all - just attached the indicator to the chart :
Re: Coding Help
Posted: Tue May 02, 2017 1:30 am
by traderduke
mladen wrote: Tue May 02, 2017 1:25 am
It is there - no changes in code made at all - just attached the indicator to the chart :
My bad! I had my M30 chart with TDI 60M time frame, so the trendpm only work on current time, can you look into that?
sorry & thanks
Ray
Re: Coding Help
Posted: Tue May 02, 2017 1:33 am
by mladen
traderduke wrote: Tue May 02, 2017 1:30 am
My bad! I had my M30 chart with TDI 60M time frame, so the trendpm only work on current time, can you look into that?
sorry & thanks
Ray
Add this line :
Code: Select all
trendpm[i] = iCustom(NULL,timeFrame,indicatorFileName,"calculateValue",RsiPeriod,RsiPrice,RsiPriceLinePeriod,RsiPriceLineMAMode,RsiSignalLinePeriod,RsiSignalLineMAMode,VolatilityBandPeriod,VolatilityBandMAMode,VolatilityBandMultiplier,ShowArrows,arrowsIdentifier,arrowsUpperGap,arrowsLowerGap,arrowsUpColor,arrowsDnColor,arrowsUpCode,arrowsDnCode,7,y);
after line 365
Re: Coding Help
Posted: Tue May 02, 2017 1:39 am
by traderduke
Mladen
thanks I should have seen that!
Bad day today!
Re: Coding Help
Posted: Tue May 02, 2017 5:02 pm
by mladen
traderduke wrote: Tue May 02, 2017 1:39 am
Mladen
thanks I should have seen that!
Bad day today!
It happens sometimes to everybody
Happy trading
Re: Coding Help
Posted: Tue May 02, 2017 6:54 pm
by Newton51
mladen wrote: Mon May 01, 2017 6:47 pm
I stand corrected
You can do that - see the following code - and it works in run-time too
Code: Select all
Comment("Current fixed minimum : "+(string)WindowPriceMin(WindowFind(shortName))+"\n"+
"Current fixed maximum : "+(string)WindowPriceMax(WindowFind(shortName)));
Thank you so much for thinking more on this query and offering this solution. I had abandoned attempting this mission but will now implement this with optimism. Very much appreciated mladen.