IF Function not working

L8 B8 O8 P8 R8
89 85 95 75 BUY


My scenario is simple i want to display text in cell R8 when L8>O8,"BUY",B8>O8,"BUY-F",L8< P8."SELL",B8< P8,"SELL-F".
For this i used function ie =IF(L8>O8,"BUY",IF(B8>O8,"BUY-F",IF(L8< P8."SELL",IF(B8< P8,"SELL-F","")))), Datas in cell L8 & B8,are real time data and in cell O8 &P8 are predefined data (manually feeded or fixed data) when i execute above function it is diplaying "BUY" instead of blank bcz data in L8 is less than O8, but this function is works correctly only when if all cells are have real time data or predefined data, above scenario is an example of one cell i want to apply it to whole sheet pls help me to resolve this issue