Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Need help for coding this basic logic

Hello, I am a student in mathematics
I am new to this field (algo trading) and I need your help to develop this logic:
nam_stock = "AAPL"
nam_stock2 = "FCB"
Size _order = 100
Profit = 300
Lost = 300

verify if the two symbols choose exists

If (nam_stock! Exist || nam_stock2! Exist)
          return 0

if (Current_position == 0)
        Order_Buy (nam_stock1, Size_order)         Order_Sell (nam_stock2, Size_ore) if Current_position> 0
     if (unrealizedProfit> = Profit || unrealizedProfit <= (- 1 * Lost))                   CloseAllCurrentOder ()