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):

//@version=3
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.

Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out