Reputation: 1
in pinescript, how can i enter a stop market order. im trying to run an School run system where as soon as the candle sweeps the previous candles low, it enters short, and vice versa, so it is not a limit order, rather a stop market order
if high>highLevel and not highBroken strategy.order("Long", strategy.long, stop=highLevel)
if low<lowLevel and not lowBroken strategy.order("Short", strategy.short, stop=lowLevel)
is my current code, and i'm looking to see how to execute a market order, as at the moment these are my entries:
and its entering on the open of the next candle
Upvotes: -1
Views: 30