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
def UpCount = (if close > open then UpCount[1] + 1 | |
else UpCount[1] +1 == 0); | |
def DownCount = (if close < open then DownCount[1] - 1 | |
else DownCount[1] - 1 == 0); | |
plot bard = if close > open then UpCount else DownCount; | |
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
####Longterm Time Frame | |
input applyCloud = yes; | |
input LT_TimeFrame = AggregationPeriod.Week; | |
input lengthLT =8; | |
input averageTypeLT = { Simple, default Exponential, Weighted, Wilders, Hull}; | |
def maLT = MovingAverage(averageType = averageTypeLT, close(period = LT_TimeFrame), lengthLT); | |
input lengthLT1 = 13; | |
input averageTypeLT1 = {Simple,default Exponential, Weighted, Wilders, Hull}; |
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
input length = 21; | |
input offset = 1; | |
def ADV = Average(volume, length)[offset]; | |
def rVol = volume /ADV; | |
def rVolmult = rVol * 5; | |
# remove "#" infront of Addlabels to select prefer choice | |
#AddLabel(yes, round(rVol,2)); |
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
name: d8dev | |
recipe: drupal8 | |
config: | |
php: '7.3' | |
via: nginx | |
webroot: web | |
database: mariadb:10.3 | |
xdebug: false | |
tooling: |
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 luvnotes_custom_page_attachments(array &$attachments) { | |
$attachments['#attached']['library'][] = 'luvnotes_custom/luvnotes_custom'; | |
} | |
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 getUserIP() { | |
$ipaddress = ''; | |
if (isset($_SERVER['HTTP_CLIENT_IP'])) | |
$ipaddress = $_SERVER['HTTP_CLIENT_IP']; | |
else if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) | |
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR']; | |
else if(isset($_SERVER['HTTP_X_FORWARDED'])) | |
$ipaddress = $_SERVER['HTTP_X_FORWARDED']; | |
else if(isset($_SERVER['HTTP_X_CLUSTER_CLIENT_IP'])) | |
$ipaddress = $_SERVER['HTTP_X_CLUSTER_CLIENT_IP']; |
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
################# | |
# ER Labels | |
################# | |
def daysBefore = 100; | |
def erInDays = AbsValue(GetEventOffset(Events.EARNINGS, 0)); | |
def before = Sum(HasEarnings(), daysBefore)[-daysBefore]; | |
AddLabel(Yes, IF before THEN "ER: "+erInDays+" days" ELSE "ER: No", IF before THEN Color.RED ELSE Color.GREEN); |
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
def IV = Imp_Volatility(); | |
def R = ((IV / IV[1]) - 1); | |
AddLabel(1, AsPercent(R), if R > R[1] then Color.Green else Color.Red); |
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 mymodule_form_node_form_alter(&$form, FormStateInterface $form_state) { | |
// For entity builders. | |
kint($form['#form_id']); | |
if($form['#form_id'] == 'node_page_edit_form') { | |
foreach (array_keys($form['actions']) as $action) { | |
if ($action != 'preview' && isset($form['actions'][$action]['#type']) && $form['actions'][$action]['#type'] === 'submit') { | |
$form['actions'][$action]['#submit'][] = 'mymodule_node_form_submit'; | |
} | |
} | |
} |
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
/** | |
* @param $obj | |
* @param $field | |
* @param $value | |
* | |
* @return bool|null | |
*/ | |
function searchJson($obj, $field, $value) { | |
$item=NULL; | |
foreach($obj as $struct) { |
NewerOlder