Hello
Im looking for someone to build a Strategy for me in Pine Script and also be able to help Webhook it with alerts to Tradestation and Coinbase
For Crypto it will be sent to coinable entering Buy and To alert for Close postion
For Stocks similar as crypto
Also would like like to be able to have the option to enter Shorts in script for use in futures
I would like to also have setting in the Script for Settings more so for future use in Futures
1. What market Session to trade only or Times to trade
2. No trades on News Day / Fed Talk etc..
Other to be added
Very Simple Strategy using EMA Cross and CCI as a confirmation
Basic Principle to take a long When EMS cross and When CCI is at desired level only
The CCI i like is below :
//@version=5
indicator(title="Commodity Channel Index", shorttitle="CCI", format=format.price, precision=2, timeframe="", timeframe_gaps=true)
length = input.int(20, minval=1)
src = input(hlc3, title="Source")
ma = ta.sma(src, length)
cci = (src - ma) / (0.015 * ta.dev(src, length))
plot(cci, "CCI", color=#2962FF)
band1 = hline(100, "Upper Band", color=#787B86, linestyle=hline.style_dashed)
hline(0, "Middle Band", color=color.new(#787B86, 50))
band0 = hline(-100, "Lower Band", color=#787B86, linestyle=hline.style_dashed)
fill(band1, band0, color=color.rgb(33, 150, 243, 90), title="Background")
ma(source, length, type) =>
switch type
"SMA" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"SMMA (RMA)" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)
typeMA = input.string(title = "Method", defval = "SMA", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group="Smoothing")
smoothingLength = input.int(title = "Length", defval = 5, minval = 1, maxval = 100, group="Smoothing")
smoothingLine = ma(cci, smoothingLength, typeMA)
plot(smoothingLine, title="Smoothing Line", color=#f37f20, display=display.none)
The EMA Cross i like is Below:
//@version=3
strategy("EMA Strategy 13 48", shorttitle = "EMA Strategy 13 48", overlay=true, pyramiding = 3,default_qty_type = strategy.percent_of_equity, default_qty_value = 1000)
// === Inputs ===
// short ma
maFastSource = input(defval = close, title = "Fast MA Source")
maFastLength = input(defval = 13, title = "Fast MA Period", minval = 1)
// long ma
maSlowSource = input(defval = close, title = "Slow MA Source")
maSlowLength = input(defval = 48, title = "Slow MA Period", minval = 1)
// === Vars and Series ===
fastMA = ema(maFastSource, maFastLength)
slowMA = ema(maSlowSource, maSlowLength)
plot(fastMA, color=blue)
plot(slowMA, color=purple)
goLong() => crossover(fastMA, slowMA)
killLong() => crossunder(close, fastMA)
strategy.entry("Buy", strategy.long, when = goLong())
strategy.close("Buy", when = killLong())
// Shorting if using
goShort() => crossunder (fastMA, slowMA)
killShort() => crossover(fastMA, slowMA)
//strategy.entry("Sell", strategy.short, when = goShort())
//strategy.close("Sell", when = killShort())
KEEP IN MIND WHILE I KNOW THIS IS SIMPLE I WANT TO WORK WITH SOMEONE THAT WILL MAKE EDITS AND HELP WITH THIS AFTER BUILT