Month: December 2021

How to Enter/Exit Positions on Bar Close in Pine Script Strategies

Order placement commands are quite important to your TradingView strategy. But many people are surprised by the default behavior of PineScript when it executes market orders. Sample Strategy  For an illustration, the Pine Script code below highlights a super simple strategy.  In this strategy, we enter and exit long positions using market orders. We also …

How to Enter/Exit Positions on Bar Close in Pine Script Strategies Read More »