For example, I'm running a scalping strategy and I bought some assets, so I have the buyprice. Now I want to initiate a SELL based on if the current price went up 0,5% above the buyprice.
I can set the limit price using the actual fill price, but I may want to cancel that order if the price goes downwards and place another order. So my question is how can I access the current price to compare it with fill price
Best posts made by Ololo
-
How can I initiate a sell based on the price value?
Latest posts made by Ololo
-
How can I cancel all orders?
how to cancel all open orders at the moment?
-
RE: How can I initiate a sell based on the price value?
@rajanprabu I want to realize a trading logic where I sell assets based on the buyprice. I can access the buyprice through notify_order BUT I need to compare it with something. self.data.close[0] doesnt make it. A simple limit order doesn't make it too because if the price goes downwards I may want to place another order so the question is how do I exactly realize this: if the price went up +1% I place an order to sell, if the price went down 1% I place an order to sell
-
RE: How can I initiate a sell based on the price value?
@ab_trader The answer isn't shown in the docs. Accessing open,high, low or close of the current bar is different from accessing current price.
-
RE: How can I initiate a sell based on the price value?
@ab_trader I thought I posted it in the wrong category because it seems to be an easy thing and nobody could answer
-
How can I initiate a sell based on the price value?
For example, I'm running a scalping strategy and I bought some assets, so I have the buyprice. Now I want to initiate a SELL based on if the current price went up 0,5% above the buyprice.
I can set the limit price using the actual fill price, but I may want to cancel that order if the price goes downwards and place another order. So my question is how can I access the current price to compare it with fill price -
RE: How can I initiate a sell based on the price value?
@run-out yes I can set the limit price using the actual fill price, but I may want to cancel that order if the price goes downwards and place another order. So my question is how can I access the current price to compare it with fill price
-
How can I initiate a sell based on the price value?
For example, I'm running a scalping strategy and I bought some assets, so I have the buyprice. Now I want to initiate a SELL based on if the current price went up 0,5% above the buyprice. I understand how can I access the buyprice but didn't find any example with current price