Closed kmohammadi6 closed 3 years ago
@kmohammadi6 thanks for the input. I think this is something i can improve to handle better inputs, but essentially you would need to provide price = NA for it to work properly. See below.
place_order(RH,
symbol="DAL",
type = 'market',
trigger = 'stop',
stop_price = round((get_positions(RH)$average_buy_price[1])*.97,2),
time_in_force = "gtc",
price = NA,
quantity = as.integer(get_positions(RH)$quantity[1]),
side = 'sell')
@kmohammadi6 I have made a couple of changes to the docs to make it easier to use. I also made price = NA
by default so you wont have to specify it anymore for stop orders.
Hello! I am having an issue placing a stop loss order using the place_order(RH) function. If I put in a price in place_order(RH) the function will run, but I receive an non-field error that reads, "Stop market sell order requested, but price provided." I have tried to run the function without providing a price variable, and setting it equal to NULL, but the function errors saying it needs a price. The following is an example of what I am trying to do:
And the following is the output from the function:
I have tried using both the CRAN and Github versions of the package and have faced the same issue. I am trying to figure out if this is user error or an issue with the package. Thanks in advance for your help!