Library Name Documentation
Usage Example
Here is an example of how to use the library:
//@version=5
// © RayPulse
// © DudeOwns
import dudeowns/NinjaView/1 as ninjaView
strategy("Simplified NinjaView Strategy", overlay=true)
// Placeholder for account and ticker details
account = input("Sim101", "Account")
ticker = input("ES 03-24", "Ticker")
qty = input(1, "Quantity")
// Define your trading conditions here
smaLength = input(20, "SMA Length")
sma = ta.sma(close, smaLength)
longCondition = ta.crossover(close, sma) // Condition to enter a long position
exitCondition = ta.crossunder(close, sma) // Condition to exit all positions
// Alerts using NinjaView library functions
if (longCondition)
alert(ninjaView.SimpleMarket("buy", account, ticker, qty, "Entering Long Position"), alert.freq_once_per_bar)
if (exitCondition)
alert(ninjaView.CloseAllPositions("sell", account, ticker, "Exiting All Positions"), alert.freq_once_per_bar)
// Visualization
plot(sma, color=color.blue, title="Simple Moving Average")
myLibraryFunction
This function does XYZ.
// Define the function
//@version=4
myLibraryFunction(arg1, arg2) =>
arg1 + arg2