The 30% of security is ordered, but when I try to enter the stop order nothing submits. It has been driving me nuts all day. Any thoughts?
# If we haven't traded this security today
if data[s]['traded'] == 0:
# Buy 30% of the security
order_target_percent( s, 0.3 )
# --- WHY WON'T THIS STOP ORDER ENTER --- #
# Put a stop loss in for 1%
okstop = c_price * 0.99
order_id = order_target_percent( s, 0, style=StopOrder( okstop ) )
print order_id # RETURNS NONE
# --------------------------------------- #