How to measure SNR with an oscilloscope
The SNR is the ratio between the power of all the signal and the power of all the noise. If I'm not mistaken, the FFT in your diagram shows you the dB in volt, not in W. In the rest of this answer, every time I say dB, it's in voltage. So 0 dB = 1 volt, 6 dB ≃ 2 volt. 



Let's assume you are sending a pure sine wave that looks like this: \$x(t) = A×\sin(\omega t)\$ volt. 


The power of \$x(t)\$ will be its RMS value, squared. So you get \$\big(\frac{A}{\sqrt{2}}\big)^2=\frac{A^2}{2}\$
The power of the noise floor will be the sum of all the RMS values, squared. So you get \$\sum\frac{A_i^2}{2}\$ where \$A_i\$ is the amplitude of each individual frequency of the FFT (without a signal present, so the green graph in your question). 
Going from dB in volt to linear volt numbers is simply \$10^{\frac{\text{dB}}{20}}\$
Going from dB in volt to linear power numbers is simply \$10^{\frac{\text{dB}}{10}}\$




The total power of the noise floor can be approximated, which I assume you want to do. So let's say you are doing a 1024 point FFT, you measure the noise floor and find out that it is about -40 dB, this is your green graph. Then let's say you do the red graph and measure your sine wave and find out that the maximum point is 6 dB.

The approximated floor noise is then:

$$P_{noise} = 1024×\frac{10^\frac{-40}{10}}{2}=0.0512 \text{ W}$$

The power of the signal is then:

$$P_{signal} = \frac{10^\frac{6}{10}}{2}=1.99 \text{ W} $$

The SNR is then:

$$\frac{P_{signal} }{P_{noise}}=\frac{1.99}{0.0512}≃38.87 = 10\log_{10}(38.87) \text{ dB}≃15.89 \text{ dB} $$



In case it's hard to absorb what I'm saying, here's the approximative equation simplified where I will mark \$\color{green}{\text{green}}\$ for your measurements according to your \$\color{green}{\text{green}}\$ graph, and \$\color{red}{\text{red}}\$ for your measurement according to your \$\color{red}{\text{red}}\$ graph.

$$
\begin{align}
\text{SNR} &amp;= \color{red}{\text{signal}}-\color{green}{\text{floor}}-10\log_{10}(\text{FFT})\text{ dB}
\\
\text{SNR} &amp;= 6-(-40)-10\log_{10}(\text{1024})\text{ dB}≃15.89 \text{ dB}\\
\end{align}
$$



So no, your method is not 100% correct, but you were very close.