How to enter a trade inside the bar, not at the close?
I tried to use "magnifier on" but it did not help.
strategy.entry("Long", strategy.long)
strategy.exit("Sell Stop", "Long", stop=lastOppositeFractalDown)
lastStop := lastOppositeFractalDown
How to enter a trade inside the bar, not at the close?
I tried to use "magnifier on" but it did not help.
strategy.entry("Long", strategy.long)
strategy.exit("Sell Stop", "Long", stop=lastOppositeFractalDown)
lastStop := lastOppositeFractalDown
strategy.entry()
will enter with a market order by default. If you want to place limit orders, you need to use the limit
or stop
arguments.
limit (series int/float) An optional parameter. Limit price of the order. If it is specified, the order type is either 'limit', or 'stop-limit'. 'NaN' should be specified for any other order type.
stop (series int/float) An optional parameter. Stop price of the order. If it is specified, the order type is either 'stop', or 'stop-limit'. 'NaN' should be specified for any other order type.