Hey everyone, I've been trying to write a script that will convert the QQQ prices over the NQ chart. So far I did get the lines to draw. Is there any way I add the ability of the QQQ price to show up just above the line. I use teh QQ lines as resistance or support lines on the NQ when trading based on option flow and institutional flow from QQQ. Thsi is the code I have so far
	
	
	
	
	
		
Thanks
	
		
			
		
		
	
				
			
		Code:
	
	# QQQ Resistance Levels on NQ
# This script plots user-defined QQQ resistance levels on an NQ chart by converting the QQQ prices to NQ equivalents.
# Define your QQQ resistance levels here.
# You can change these to any values you want.
input qqqResistance1 = 630.00;
input qqqResistance2 = 632.00;
input qqqResistance3 = 634.00;
input qqqResistance4 = 637.00;
input qqqResistance5 = 640.00;
# Fetch the closing prices for QQQ and NQ.
def qqqClose = close("QQQ");
def nqClose = close; # 'close' refers to the active chart's symbol, which is NQ in this case.
# Avoid division by zero by setting the ratio to 1 if QQQ price is 0.
def ratio = if qqqClose != 0 then nqClose / qqqClose else 1;
# Calculate the corresponding NQ price for each QQQ resistance level.
def nqResist1 = qqqResistance1 * ratio;
def nqResist2 = qqqResistance2 * ratio;
def nqResist3 = qqqResistance3 * ratio;
def nqResist4 = qqqResistance4 * ratio;
def nqResist5 = qqqResistance5 * ratio;
# Plot the converted resistance levels as horizontal lines.
plot R1 = nqResist1;
plot R2 = nqResist2;
plot R3 = nqResist3;
plot R4 = nqResist4;
plot R5 = nqResist5;
# Set the appearance for the plotted lines.
R1.SetDefaultColor(Color.RED);
R2.SetDefaultColor(Color.RED);
R3.SetDefaultColor(Color.RED);
R4.SetDefaultColor(Color.RED);
R5.SetDefaultColor(Color.RED);
R1.SetLineWeight(2);
R2.SetLineWeight(2);
R3.SetLineWeight(2);
R4.SetLineWeight(2);
R5.SetLineWeight(2);Thanks
			
				Last edited by a moderator: 
			
		
	
								
								
									
	
		
			
		
		
	
	
	
		
			
		
		
	
								
							
							 
				 
						