Bonjour,
 
J’essais de faire déclencher une alerte(+1) lorsque le niveau que j’appelle “seuil” est touché. Ce niveau est défini ligne 9 et 12…
Plus simplement je voudrais savoir comment récupérer le niveau de 50% entre le low[1] et high[3] ligne 7.
J’espère être clair…
Merci
 
 
		
		
			
			
			
			
				
					
				
					1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
				 
						once   surveillerachat= 0 
// 
Signal  =   0 
// 
AlerteFVG  =   0 
// Formulation de l'algorithme Fair Value Gap High 
FVGHigh   =   low [ 1 ] > high [ 3 ] 
// 
FVG50  =   abs (low [ 1 ] - high [ 3 ] / 2 )
// Représentation graphique Fair Value Gap High 
if   FVGHigh  then 
Seuil    =   FVG50
StopOut  =   FVG50
Signal   =   1 
surveillerachat= 1 
endif 
 
Validation    =   low [ 1 ] < Seuil  and   close [ 1 ] > Seuil
Invalidation  =   -   (close [ 1 ] < Seuil)
 
if   surveillerachat= 1   and   Validation  and   not   FVGHigh  then 
AlerteFVG= 1 
surveillerachat= 0 
elsif   surveillerachat= 1   and   Invalidation= - 1   then 
surveillerachat= - 1 
endif 
 
Return   AlerteFVG  as   "AlerteFVG" ,  Signal  as   "Signal" ,  surveillerachat  style (dottedline ,1 )  as   "surveillerachat"