user29765195
user29765195

Reputation: 1

Pinescript stop market order

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:

Tradingview chart

and its entering on the open of the next candle

Upvotes: -1

Views: 30

Answers (0)

Related Questions