Indicator · Pine Script v4 · Own pane

AmiComStrategy

by amico1234· code credited to Ami Shmueli

AmiComStrategy is an indicator that calculates correlations between securities using the Corell indicator over specified timeframes such as 5D.

View on GitHub

GitHub stars1on the repository
Pine versionv4older, still runs
Lines of code177
Settings8inputs
LicenceNone statedfile: MPL-2.0
Last update2 years ago2 Mar 2024

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

177 lines of Pine Script v4 from strategy.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

strategy.pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Ami Shmueli
//@version=4

study(title="AmiComStrategy", shorttitle="AmiComStrategy")


// ======= level ======= //
1 fats, isob, fvgtrend, logdiff, demendsupplyvolume with volume
2 iiot, bjtsi, logistic
3 sroc, macz (mcfree), JUMBO REDGREEN
4 JUMBO TRADE
5 RENKO, RENKO STRATEGY, pgo renko



// ======= var trade param ======= //

// tale also from trading engine open source

// var corell
var  float MinimumCorellPlus  = input (title="CorellPlus", defval = 0.89, minval=0.80, maxval=1.00, step=0.01) // 0.89
var  float MinimumCorellMinus = input (title="CorellMinus", defval = -0.89, minval= -1.00, maxval= -0.80,  step=0.01) // -0.89
var CorellTimeFrame = input(title="CorellTimeFrame", defval="5D", options=["5D", "13D", "18D"]) // String !!!

// var bool corell
IsNotCorell = false
IsCorell = false

// count corell

NumCorellSec = 0
NumCorellInsight = 0

// var Trade session
var TradingHoursSession = input(title="TradingHoursSession", defval="1300-1700", options=["24x7", "0900-1300", "1300-1700", "1700-2100"]) // String !!!

// var UpTime
var SecBullUpTime = input (title="SecBullUpTime", defval = "3H", options=["3H", "5H", "8H", "1D", "2D"])  // String !!!
var SecBearDownTime = input (title="SecBullUpTime", defval = "3H", options=["3H", "5H", "8H", "1D", "2D"]) // String !!!

var InsightAlertTime = input (title="InsightAlertTime", defval = "3H", options=["3H", "5H", "8H", "1D", "2D"]) // String !!!

// ======= sec players ======= //
purple list
fred
ethanol
cass
snp

// mumber of securities
// up to 40 securities to check corell 

// ======= ext players (input) ======= //

rig
eia

// ======= insight players ======= //

// regular 

// volatility 
note: crsi (only for vxxle, xle !!!!!)


// var number of alets per day
AlertsPerDay = 0
lertsCurrentDay = 0
AlertsDayBefore = 0

// ======= var insights array name ======= //

// var Insights array name: 5 low: Decorative
InsightName5DecorArray = array.new_string(0)
 
// var Insights array name: 4 
InsightName4Array = array.new_string(0)

// var Insights array name: 3
InsightName3Array = array.new_string(0)

// var Insights array name: 2
InsightName2Array = array.new_string(0)

// var Insights array name: 1
InsightName1Array = array.new_string(0)



// ======= var insights ======= //
var Insight1ofRank5 = "Insight1ofRank5" 
var Insight2ofRank5 = "Insight2ofRank5" 
var Insight3ofRank5 = "Insight3ofRank5" 
var Insight4ofRank5 = "Insight4ofRank5" 
var Insight5ofRank5 = "Insight5ofRank5" 

var Insight1ofRank4 = "Insight1ofRank4" 
var Insight2ofRank4 = "Insight2ofRank4" 
var Insight3ofRank4 = "Insight3ofRank4" 
var Insight4ofRank4 = "Insight4ofRank4" 
var Insight5ofRank4 = "Insight5ofRank4" 

var Insight1ofRank3 = "Insight1ofRank3" 
var Insight2ofRank3 = "Insight2ofRank3" 
var Insight3ofRank3 = "Insight3ofRank3" 
var Insight4ofRank3 = "Insight4ofRank3" 
var Insight5ofRank3 = "Insight5ofRank3" 

var Insight1ofRank2 = "Insight1ofRank2" 
var Insight2ofRank2 = "Insight2ofRank2" 
var Insight3ofRank2 = "Insight3ofRank2" 
var Insight4ofRank2 = "Insight4ofRank2" 
var Insight5ofRank2 = "Insight5ofRank2" 

var Insight1ofRank1 = "Insight1ofRank1" 
var Insight2ofRank1 = "Insight2ofRank1" 
var Insight3ofRank1 = "Insight3ofRank1" 
var Insight4ofRank1 = "Insight4ofRank1" 
var Insight5ofRank1 = "Insight5ofRank1" 

// array element 

// array.insert(alertcondition = )
InsightName1Array = array.push (Insight1ofRank1, Insight1ofRank2)

// ======= var rank array ======= //




// max rank points, without bonus // 100
// max rank points, with bonus //118

// curreny total rank point

// current rank
// number of insight out of insight, in a rank, current day
// number of insight out of insight, in a rank, comulative

// bonus rank for corell
// bonus of number of alerts per day



// var inflation
var InflationPrice = input (title="InflationPrice", defval = "0")

//

// e2 resistance, setup, reload (input)
plot (close)

// cass info band wti: 75.5, 63.5 , 53.5



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//plot(time(timeframe.period, s))

//Mode = input(title = "MA Mode", defval="SMMA", options=["TMA","ALMA", "EMA", "Kijun", "Kijun v2", "McGinley", "IDWMA", "A2RMA", "EDSMA"])

// vq0_th = input(1.64, title="Threshold 1")
// vq0_th2 = input(1.96, title="Threshold 2")
// vq0_th3 = input(2.58, title="Threshold 3")


// int     length      = input(20, title="Length", minval=1)
// string  bbmatype    = input(defval='SMA', title='Bollinger Bands Calculation Type', options=['SMA', 'EMA', 'WMA', 'VWMA', 'RMA'])
// string  kcmatype    = input(defval='SMA', title='Keltner Channel Calculation Type', options=['SMA', 'EMA', 'WMA', 'VWMA', 'RMA'])
// int     color_1     = input(title="Color Format", defval=2, minval=1, maxval=6)
// bool    drdiv       = input(defval=false, title="Draw Divergence")
// bool    bgoff       = input(defval=false, title="Background Off")
// bool    darkm       = input(defval=true, title="Gray Background for Dark Mode")
// bool    zerold      = input(defval=false, title="Zero Line Dots")
// bool    lowsqzwht   = input(defval=true, title="Low Squeeze White")

Overview

AmiComStrategy filters trading opportunities based on session times like 1300-1700 and security up and down times such as 3H. The script generates ranked insights from multiple players including fats isob fvgtrend and others then sends alerts via InsightAlertTime. Main settings let users adjust correlation thresholds CorellPlus and CorellMinus trading session options and insight alert durations. It draws ranked insights and alerts in a separate pane.

Details

Published by

amico1234 on GitHub

Code credit

Ami Shmueli, as written in the script's header

Type

Indicator, Pine Script v4

Draws

Separate pane below the chart

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
CorellPlusfloat0.89MinimumCorellPlus
CorellMinusfloat-0.89MinimumCorellMinus
CorellTimeFramestring5DCorellTimeFrame
TradingHoursSessionstring1300-1700TradingHoursSession
SecBullUpTimestring3HSecBullUpTime
SecBullUpTimestring3HSecBearDownTime
InsightAlertTimestring3HInsightAlertTime
InflationPricestring0InflationPrice
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

This indicator combines six trading tools into a single chart overlay to optimize indicator limits. It calculates Bollinger Bands, projects weekend price boundaries, plots market structure elements like order blocks, breaker blocks, and MSB lines, marks New Yo

Indicator v6 Support & resistanceSMC / ICT / price action Repaints
6 stars

This indicator detects Turtle Soup liquidity sweeps and Candle Range Theory setups directly on the price chart. It checks breakout distances against ATR boundaries while requiring optional volume spikes and momentum shifts to confirm reversal signals or flag i

Indicator v5 SMC / ICT / price actionSupport & resistance

ICT Macros

by klimasevskiy
2 stars

The ICT Macros indicator plots volatility periods based on ICT smart money concepts on the price chart. It highlights London Macros (02:33-03:00, 04:03-04:30), New York AM Macros (08:50-09:10, 09:50-10:10, 10:50-11:10), and New York Lunch + PM Macros (11:50-12

Indicator v5 Volatility & bandsSupport & resistance
Updated 1 year ago · None stated GitHub repository of ICT Macros
3 stars

This indicator calculates and plots the NYSE Cumulative Tick Index as colored candles in a separate pane, with green indicating upward tick trends and red downward trends. Overbought and oversold zones are marked using smoothed averages of high and low tick va

Indicator v5 Oscillators & momentumVolatility & bands
Updated 5 months ago · None stated GitHub repository of CSW Tick Internals

SMC Context Bus

by skipp-dev
1 stars

This indicator builds a smart-money context frame in a separate pane by calling a private context engine. It exposes hidden numeric plots for schema version, readiness, bias, quality, market structure including break of structure and change of character, imbal

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 4 days ago · None stated GitHub repository of SMC Context Bus

More Sessions & time scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers