I successfully added the strategy on my chart, but it does not generate any orders

If the strategy does not generate a single order when applied to the chart, and there are no errors in the chart legend (at the top), it means the conditions for the order generation were not met. It could also mean that the orders were generated, but never met the market price.

You can add plots to your strategy source code to see when the conditions are met/not visible on the chart. Here is a modified code of our blank strategy script that demonstrates how you can do this (pay attention to plotshape functions):

strategy("My Strategy", overlay=true)

longCondition = crossover(sma(close, 14), sma(close, 28))
if (longCondition)
    strategy.entry("My Long Entry Id", strategy.long)

plotshape(longCondition, color = blue)

shortCondition = crossunder(sma(close, 14), sma(close, 28))
if (shortCondition)
    strategy.entry("My Short Entry Id", strategy.short)

plotshape(shortCondition, color = red)

If the conditions are met, you will see red and blue crosses above the bars.

Hem Aktie-screener Forex-screener Krypto-screener Ekonomisk kalender Om Diagramfunktioner Priser Tipsa en vän Ordningsregler Hjälpcenter Webbsidor och mäklarlösningar Widgets Diagramlösningar Lightweight Charting Library Blogg och nyheter Twitter
Profil Profilinställningar Konto och fakturering Hänvisade vänner Mynt Mina kölappar Hjälpcenter Privata meddelanden Chatt Logga ut