Hi MrTools,
Is it possible to make the amplitude value accept decimal values?
Thanks again.
Re: MT4 Indicator requests and ideas
3692Want to say that is similar to fractals.MX01 wrote: Thu Jul 05, 2018 4:47 pm Hey there mrtools or any other experts here
Does this kind of pivot points for MT4 exist? I have it only for ThinkOrSwim but can't find for MT4.
See the screenshot with yellow dots. The yellow dots appear after the fact, so they're not real time entry signals of course. But it draws previous pivot points. In this case it's on M1 chart and set to "num bars 5".
Here is also the TOS code of the indicator. Not sure if some coding expert can translate it for MT4. And if such a pivot points indi for MT4 exists already please attach here and I thank you very much!
Screen Shot 2018-07-05 at 08.43.58.png
Code: Select all
input numBars = 5; input showLines = yes; input showValues = yes; input showBarNumbers = no; input TrendResistanceStart = 0; input TrendResistanceEnd = 0; input TrendSupportStart = 0; input TrendSupportEnd = 0; def UserSetResistance = TrendResistanceStart > 0 and TrendResistanceEnd > 0; def UserSetSupport = TrendSupportStart > 0 and TrendSupportEnd > 0; def currentHigh = high; def currentLow = low; def currentBar = BarNumber(); def PH; def PL; def isHigherThanNextBars = fold i = 1 to numBars + 1 with p = 1 while p do currentHigh > GetValue(high, -i); PH = if UserSetResistance and ( currentBar == TrendResistanceStart or currentBar == TrendResistanceEnd ) then currentHigh else if !UserSetResistance and (currentBar > numBars and currentHigh == Highest(currentHigh, numBars) and isHigherThanNextBars) then currentHigh else Double.NaN; def isLowerThanNextBars = fold j = 1 to numBars + 1 with q = 1 while q do currentLow < GetValue(low, -j); PL = if UserSetSupport and ( currentBar == TrendSupportStart or currentBar == TrendSupportEnd ) then currentLow else if !UserSetSupport and (currentBar > numBars and currentLow == Lowest(currentLow, numBars) and isLowerThanNextBars) then currentLow else Double.NaN; rec PHBar = if UserSetResistance then TrendResistanceEnd else if !IsNaN(PH) then currentBar else PHBar[1]; rec PLBar = if UserSetSupport then TrendSupportEnd else if !IsNaN(PL) then currentBar else PLBar[1]; rec PHL = if !IsNaN(PH) then PH else PHL[1]; rec priorPHBar = if UserSetResistance then TrendResistanceStart else if PHL != PHL[1] then PHBar[1] else priorPHBar[1]; rec PLL = if !IsNaN(PL) then PL else PLL[1]; rec priorPLBar = if UserSetSupport then TrendSupportStart else if PLL != PLL[1] then PLBar[1] else priorPLBar[1]; def isFinalTwoHighPivots = currentBar >= HighestAll(priorPHBar); def isFinalTwoLowPivots = currentBar >= HighestAll(priorPLBar); def ResistanceFinishOffset = if isFinalTwoHighPivots then currentBar - PHBar else 0; def ResistanceStartOffset = if isFinalTwoHighPivots then currentBar - priorPHBar else 0; def ResistanceSlope = (GetValue(PH, ResistanceFinishOffset) - GetValue(PH, ResistanceStartOffset)) / (PHBar - priorPHBar); def SupportFinishOffset = if isFinalTwoLowPivots then currentBar - PLBar else 0; def SupportStartOffset = if isFinalTwoLowPivots then currentBar - priorPLBar else 0; def SupportSlope = (GetValue(PL, SupportFinishOffset) - GetValue(PL, SupportStartOffset)) / (PLBar - priorPLBar); rec ResistanceExtend = if currentBar == HighestAll(PHBar) then 1 else ResistanceExtend[1]; rec SupportExtend = if currentBar == HighestAll(PLBar) then 1 else SupportExtend[1]; def pivotHigh = if #isFinalTwoHighPivots ph>0 then PH else Double.NaN; def pivotLow = if #isFinalTwoLowPivots pl>0 then PL else Double.NaN; plot PivotDot = if !IsNaN(pivotHigh) then pivotHigh else if !IsNaN(pivotLow) then pivotLow else Double.NaN; PivotDot.SetDefaultColor(COLOR.YELLOW); PivotDot.SetPaintingStrategy(PaintingStrategy.POINTS); PivotDot.SetLineWeight(5);
Re: MT4 Indicator requests and ideas
3693Try changing extern int Amplitude = 2; to extern double Amplitude = 2;.Deez wrote: Thu Jul 05, 2018 8:43 pm Hi MrTools,
Is it possible to make the amplitude value accept decimal values?
Thanks again.
Re: MT4 Indicator requests and ideas
3694Jagg wrote: Thu Jul 05, 2018 6:36 pm
Old question but stumbled over this today for myself (with DAX and DOW).
You have to increase the MaxValue from default 200 to a value above DOW High e.g. 30000 and then you can see the zones on DAX, DOW,... also!
it seems to be working with your suggestion, thanks
Re: MT4 Indicator requests and ideas
3695Don't know why the user should hardcode here a MaxValue.
I have commented out the (extern double MaxValue... line) and added this in global space
Code: Select all
double window_top,window_bottom;
Code: Select all
window_top=WindowPriceMax()+iATR(Symbol(),PERIOD_D1,5,0);
window_bottom=MathMax(0,WindowPriceMin()-iATR(Symbol(),PERIOD_D1,5,0));
Code: Select all
ObjectCreate(name,OBJ_RECTANGLE,0,times[i+1],0,lastTime,MaxValue);
Code: Select all
ObjectCreate(name,OBJ_RECTANGLE,0,times[i+1],window_bottom,lastTime,window_top);
I have added also a "ShowBadAngleZoneInMainChart" input setting. Whenever the angle is smaller than AngleLevel a zone is marked in the main chart (I want to trade only when we have a good slope/angle for example)...
Don't know if this is useful for someone else but I add my changed file here as attachement.
Attachments
Re: MT4 Indicator requests and ideas
3696looks interestingJagg wrote: Fri Jul 06, 2018 6:02 pm
Don't know why the user should hardcode here a MaxValue.
I have commented out the (extern double MaxValue... line) and added this in global spacethen added this in init() sectionCode: Select all
double window_top,window_bottom;
and changed the ObjectCreate fromCode: Select all
window_top=WindowPriceMax()+iATR(Symbol(),PERIOD_D1,5,0); window_bottom=MathMax(0,WindowPriceMin()-iATR(Symbol(),PERIOD_D1,5,0));
toCode: Select all
ObjectCreate(name,OBJ_RECTANGLE,0,times[i+1],0,lastTime,MaxValue);
Code: Select all
ObjectCreate(name,OBJ_RECTANGLE,0,times[i+1],window_bottom,lastTime,window_top);
I have added also a "ShowBadAngleZoneInMainChart" input setting. Whenever the angle is smaller than AngleLevel a zone is marked in the main chart (I want to trade only when we have a good slope/angle for example)...
Don't know if this is useful for someone else but I add my changed file here as attachement.
Re: MT4 Indicator requests and ideas
3697Forgot to mention in prev post that I adopted this zones idea from "dema macd zones alerts 2.mq4" into the the "Angle of NonLag MA 1.01.mq4" indicator posted here on forex-station.com .....
Re: MT4 Indicator requests and ideas
3698Hi Guys, Can someone please make a histogram version of this indicator please.
Cheers
Cheers
Re: MT4 Indicator requests and ideas
3699Made a histo versiontommo78 wrote: Sat Jul 07, 2018 1:10 pm Hi Guys, Can someone please make a histogram version of this indicator please.
Cheers
Re: MT4 Indicator requests and ideas
3700I really want to appreciat you sir for your effort in helping traders. I just joined this forum yesterday.
Please i have two indicators i want you to help me put together to form a trading system.
one is what i downloaded from here you made it and is very great because it does not repaint.
The second i got it elswhere but if this two are put together it can form a nice trading system.
First sir i want you to check if the ATB SNIPER repaints. if it does please make it a non repainted.
The arrow indicator i got from you does not repaint.
Please combine the two indicators to give an alert whenever new triangle starts forming on any time frame on the listed currency pairs.
As the triangle is forming I want to be receiving alert any time arrow appers.
PLEASE ADD EMAIL NOTIFICATION, PUSH NOTIFICATION, MOBILE AND TEXT ALERT THE THE ENTIRE SYSTEM.
THANK YOU SIR. I AWAIT YOUR RESPONSE SIR.
Please i have two indicators i want you to help me put together to form a trading system.
one is what i downloaded from here you made it and is very great because it does not repaint.
The second i got it elswhere but if this two are put together it can form a nice trading system.
First sir i want you to check if the ATB SNIPER repaints. if it does please make it a non repainted.
The arrow indicator i got from you does not repaint.
Please combine the two indicators to give an alert whenever new triangle starts forming on any time frame on the listed currency pairs.
As the triangle is forming I want to be receiving alert any time arrow appers.
PLEASE ADD EMAIL NOTIFICATION, PUSH NOTIFICATION, MOBILE AND TEXT ALERT THE THE ENTIRE SYSTEM.
THANK YOU SIR. I AWAIT YOUR RESPONSE SIR.
Attachments