The Misva of the Hanukah candles, as we know, is Pirsumeh Nisa to publicize the Hanukah miracle. And therefore the candles are generally positioned (by those who light indoors; some people light outdoors) near the window facing the street, in order to publicize the miracle.
The question arises as to whether one who lives on a high floor in an apartment building should also light by the window. The halachic sources mention that people in the street do not normally look at heights greater than 20 Amot, and thus it would seem that if one lives in an apartment that is higher than 20 Amot, he does not achieve anything by lighting by the window. On the other hand, one could argue that he should light by the window because the candles will then be visible by those in neighboring buildings who will see the candles through their window.
Rav Yosef Shalom Elyashiv (1910-2012) reportedly ruled that the obligation of Pirsumeh Nisa requires displaying the candles to people in the public domain, not to neighboring buildings, and thus one does not achieve this goal by lighting by the window in such a case. Instead, one should light by the doorway to his apartment, opposite the Mezuzah. This is also the ruling of Hacham Ovadia Yosef, as codified in Yalkut Yosef (English edition, p. 81; listen to audio recording for precise citation).
Summary: If one lives an apartment over 20 Amot from the ground, he should not light the Hanukah candles by the window, and should instead light them in the doorway to his apartment.