This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Get transactions from customer transaction history and sort them by date oldest to newest | |
var lastTransactionRow = SpreadsheetApp.getActive().getRangeByName('lastTransactionRow').getValue(); | |
var transactions = SpreadsheetApp.getActive().getSheetByName("History").getRange("B3:J" + (lastTransactionRow - 1)).getValues(); | |
transactions = transactions.sort(compareNthElements(4, basicComparator)); | |
//specify which column contains the account name (arrays are 0 based) | |
var accountCol = 2; | |
//tickers may be duplicated across accounts; each key in a Map object must be unique; therefore each account needs it's own map | |
var account1 = new Map(); | |
var account2 = new Map(); | |
var account3 = new Map(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//***GLOBALS***// | |
var ss = SpreadsheetApp.getActive(); | |
var portfolioSheet = ss.getSheetByName("master"); //replace master with name of the tab that has your portfolio data | |
var columnToCheck = portfolioSheet.getRange("A:A").getValues(); | |
// Get the last row based on the data range of a single column. | |
var tickerCount = getLastRowSpecial(columnToCheck); | |
/************************************************************************ | |
* | |
* Gets the last row number based on a selected column range values |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function plotDailyPL() { | |
//read the counter (#) in cell A1 of History, number in cell is the row of column to input data | |
var counter = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("History").getRange("E2"); | |
// record DATE in cell A# | |
var date = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("History").getRange("D"+counter.getValue()); | |
date.setValue(new Date(new Date().getFullYear(),new Date().getMonth(), new Date().getDate())); | |
//read portfolio value in "Portfolio Sheet" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function plotDailyValuation() { | |
//read the counter (#) in cell A1 of History, number in cell is the row of column to input data | |
var counter = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("History").getRange("D2"); | |
// record DATE in cell A# | |
var date = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("History").getRange("A"+counter.getValue()); | |
date.setValue(new Date(new Date().getFullYear(),new Date().getMonth(), new Date().getDate())); | |
//read portfolio value in "Portfolio Sheet" | |
var portfolioValue = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Portfolio").getRange("H18"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FB IA markup: | |
<p>Official ooyala plugin shortcode:</p> | |
<figure class="op-interactive"> | |
<iframe | |
src="https://thesuncouk-develop.go-vip.co/ooyala-iframe/33447?code=t4OWo4NTE6Ye7cqQPGJ7ZPXNTA0ULOrj&player_id=YmRmN2I0ZDMwNDI5NTFlZGI4NDM1OWM4&width=1920&height=1080&caption=test_ooyala_upload_02.mp4&auto=true" | |
class="no-margin" width="480" height="320"></iframe> | |
</figure> | |
<p>Our custom generated iframe & player:</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function __construct( ) { | |
add_action( 'init', array( $this, 'register_shortcode_ui' ) ); | |
} | |
function register_shortcode_ui() { | |
apply_filters( 'hm_toc_register_shortcode_ui', false ); | |
// Do I need to include the actual code/file here that registers things |