indicateur MACD 4c, conversion code mq4 vers prorealtime
Forums › ProRealTime forum Français › Support ProBuilder › indicateur MACD 4c, conversion code mq4 vers prorealtime
- This topic has 9 replies, 2 voices, and was last updated 7 years ago by robins. 
- 
	
		
- 
		
			
				
09/27/2018 at 11:17 AM #81436Bonjour Pourriez vous convertir cet indicateur s’il vous plait Cet indicateur me permet de me situer par rapport aux vagues d’Elliott https://www.screencast.com/t/pfZO9s6B Un grand merci d’avance Cordialement 09/27/2018 at 2:49 PM #81468Cet indicateur est en fait le MACD classique, “4c” signifiant simplement “4 colours”. Dans le même style, il y a cet indicateur dans notre bibliothèque : MACD histogram color Les couleurs sont différentes toutefois, est-ce un problème ? Si oui je peux les modifier bien entendu. 09/27/2018 at 3:14 PM #8147409/28/2018 at 8:00 AM #81509Ci-dessous le code répliquant les mêmes couleurs que la version MT4 : 123456789101112131415161718192021222324252627282930313233343536373839//PRC_MACD color histogram | indicator//03.04.2017//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledge//translated from MT4 code// --- settingsfast = 12slow = 26// --- end of settingsmyMACD=exponentialaverage[fast]-exponentialaverage[slow]if myMACD>0 thenif myMACD>myMACD[1] thenr=0g=255b=0elser=0g=128b=0endifelseif myMACD>myMACD[1] thenr=255g=0b=0elser=128g=0b=0endifendifRETURN myMACD coloured(r,g,b) style(histogram) as "MACD histogram"09/28/2018 at 11:32 AM #8153110/11/2018 at 11:31 AM #82549Bonjour Nicolas Est il possible de créer cet indicateur pour ProRealTime svp ? //@version=3 
 study(shorttitle = “MACD 4C w.SM”, title = “MACD with settingsMultiplier”, precision = 5)
 factor = input(title=”Settings Mutiplier”, type=float, defval=1.0, minval=0.5,step=0.5)
 fastMA = round(12*factor)
 slowMA = round(26*factor)
 lastColor = yellow
 [currMacd,_,_] = macd(close[0], fastMA, slowMA, 9)
 [prevMacd,_,_] = macd(close[1], fastMA, slowMA, 9)
 plotColor = currMacd > 0 ? currMacd > prevMacd ? #73EF2B : #469916 : currMacd < prevMacd ? #FF0000 : #FF4343
 plot(currMacd, style = histogram, color = plotColor, linewidth = 3)
 plot(0, title = “Zero line”, linewidth = 1, color = gray)
 upCross = currMacd > 0 and prevMacd < 0
 downCross = currMacd < 0 and prevMacd > 0
 plotshape(upCross, style = shape.labelup, color = #73EF2B, location = location.bottom)
 plotshape(downCross, style = shape.labeldown, color = #D11515, location = location.top)Merci d’avance 10/11/2018 at 12:00 PM #8255010/11/2018 at 12:18 PM #8255110/11/2018 at 12:27 PM #82552Désolé je n’avais pas remarqué, ce sont les périodes qui sont factorisées, à essayer : 123456789101112131415161718192021222324252627282930313233343536373839404142//PRC_MACD color histogram | indicator//03.04.2017//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledge//translated from MT4 code// --- settingsfast = 12slow = 26factor = 1.0// --- end of settingsfast = round(fast*factor)slow = round(slow*factor)myMACD=exponentialaverage[fast]-exponentialaverage[slow]if myMACD>0 thenif myMACD>myMACD[1] thenr=0g=255b=0elser=0g=128b=0endifelseif myMACD>myMACD[1] thenr=255g=0b=0elser=128g=0b=0endifendifRETURN myMACD coloured(r,g,b) style(histogram) as "MACD histogram"10/11/2018 at 5:11 PM #82570
- 
		AuthorPosts
			Find exclusive trading pro-tools on 


 
		 
		 
		