Hope these all work...
- Done
- Done
- Example working
Just one thought, at the moment you can select more than 1 time, is that what you intended?
Would you post your setbox CSS file so that I can get my copy to look like yours?
Showing changes to function
scope.m15 = false
scope.m30 = false
scope.h1 = false
scope.h2 = false
// Clear form
scope.clear_form = function() {
local_amt = ''
local_sl_trl = ''
local_sl = ''
local_tp = ''
local_tp_trl = ''
local_tm = ''
local_coin = ''
showChange()
}
scope.tdv = function(boxChecked) {
scope.send({topic: 'tdv', payload:{m15: scope.m15, m30: scope.m30, h1: scope.h1, h2: scope.h2}})
}
[{"id":"9814b6e83a2c8ddd","type":"change","z":"d69bda8308d00eeb","name":"Currency Defaults","rules":[{"t":"set","p":"payload","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"payload.currency","pt":"msg","to":"GALA","tot":"str"},{"t":"set","p":"payload.exchange","pt":"msg","to":"Gate.io","tot":"str"},{"t":"set","p":"payload.flag","pt":"msg","to":"reset","tot":"str"},{"t":"set","p":"time","pt":"msg","to":"","tot":"date"},{"t":"set","p":"payload.change","pt":"msg","to":"","tot":"str"},{"t":"set","p":"payload.window","pt":"msg","to":"","tot":"str"},{"t":"set","p":"payload.note","pt":"msg","to":"","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"reset","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":480,"wires":[["ecbe445a1df09c3f","427dd8c9300133e1"]]},{"id":"dcae8eef8641461b","type":"change","z":"d69bda8308d00eeb","name":"Form Defaults","rules":[{"t":"set","p":"payload","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"payload.amt","pt":"msg","to":"20","tot":"str"},{"t":"set","p":"payload.tp","pt":"msg","to":"5","tot":"str"},{"t":"set","p":"payload.tp_trl","pt":"msg","to":"3","tot":"str"},{"t":"set","p":"payload.sl","pt":"msg","to":"3","tot":"str"},{"t":"set","p":"payload.sl_trl","pt":"msg","to":"2","tot":"str"},{"t":"set","p":"payload.tm","pt":"msg","to":"1","tot":"str"},{"t":"set","p":"payload.sav","pt":"msg","to":"false","tot":"bool"},{"t":"set","p":"payload.clear","pt":"msg","to":"false","tot":"bool"},{"t":"set","p":"payload.state","pt":"msg","to":"M","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":300,"wires":[["f8068258c9fe415a","8ae906e22a6fc9ce"]]},{"id":"ecbe445a1df09c3f","type":"link out","z":"d69bda8308d00eeb","name":"link out 34","mode":"link","links":["d1da4326b4ca3757"],"x":575,"y":540,"wires":[]},{"id":"37ab719d1e96f5e5","type":"link in","z":"d69bda8308d00eeb","name":"link in 10","links":[],"x":245,"y":360,"wires":[["dcae8eef8641461b","9814b6e83a2c8ddd"]]},{"id":"37755b5ae569b01c","type":"function","z":"d69bda8308d00eeb","name":"set","func":"/**\n * Explaination\n * Deconstruct the payload Object into local variables\n * \n * If you want to provide default values\n * let {state = true, amt = 1, tp, tp_trl, sl, sl_trl, tm, sav} = msg.payload\n */\n\nlet {state, amt, tp, tp_trl, sl, sl_trl, tm, sav, clear = false} = msg.payload\nlet amt_a, tp_a, tp_trl_a, sl_a, sl_trl_a, tm_a, tp_s, sl_s, tp_s_a, sl_s_a, tp_trl_s, tp_trl_s_a, sl_trl_s, sl_trl_s_a, tm_s, tm_s_a, P, L, P_a, L_a, T, T_a\n\nlet topic = msg.topic\n\nif (msg.topic === \"mode\") {\n flow.set('state', state);\n}\n\nif (flow.get('state') === \"M\") {\n\n // If SET Button pressed\n if (sav) {\n\n /**\n * Explaination\n * if ( some_variable ) {\n * we don't get here if some_variable is null, undefined, 0, NaN, false, or \"\"\n * }\n * \n * \n */\n if ( amt && amt > 19 && amt < 1001 ) {\n flow.set('amt', amt)\n } else {\n amt = null\n } \n\n if ( tp && tp > 0 && tp < 16 ) {\n flow.set('tp', tp);\n tp_s = true;\n } else {\n tp = null;\n tp_s = false;\n \n }\n \n flow.set('tp_s', tp_s);\n\n if ( tp_trl && tp_trl > 0 && tp_trl < 4 ) {\n flow.set('tp_trl', tp_trl);\n tp_trl_s = true;\n } else {\n tp_trl = null;\n tp_trl_s = false;\n \n } \n \n flow.set('tp_trl_s', tp_trl_s);\n\n if ( sl && tp && tp > 0 && tp < 6 ) {\n flow.set('sl', sl);\n sl_s = true;\n } else {\n sl = null;\n sl_s = false;\n \n }\n \n flow.set('sl_s', sl_s);\n\n if ( sl_trl && sl_trl > 0 && sl_trl < 4 ) {\n flow.set('sl_trl', sl_trl);\n sl_trl_s = true;\n } else {\n sl_trl = null;\n sl_trl_s = false;\n \n }\n \n flow.set('sl_trl_s', sl_trl_s);\n\n if ( tm && tm > 0 && tm < 4 ) {\n flow.set('tm', tm)\n tm_s = true;\n\n } else {\n tm = null;\n tm_s = false;\n \n }\n \n flow.set('tm_s', tm_s);\n\n }\n\n /** \n * Template literal\n * `string text ${expression} string text`\n */\n \n if(tp_s) {P = \"${flow.get('tp')} : ${flow.get('tp_trl')}\"} else {P = \"\"} \n \n// msg.payload = `${flow.get('amt')} | L: ${flow.get('sl')} : ${flow.get('sl_trl')} | T ${flow.get('tm')} | ${flow.get('int', 'file')}`\n \n msg.payload = `${flow.get('amt')} | P: ${flow.get('tp')} : ${flow.get('tp_trl')} | L: ${flow.get('sl')} : ${flow.get('sl_trl')} | T: ${flow.get('tm')} | ${flow.get('int', 'file')}`\n msg.color = \"#777777\"\n\n} else if (flow.get('state') === \"A\") {\n \n if (sav) {\n\n if ( amt && amt > 0 && amt < 1001 ) {\n flow.set('amt_a', amt, 'file')\n } else {\n amt_a = null\n }\n\n if ( tp && tp > 0 && tp < 16 ) {\n flow.set('tp_a', tp, 'file'); tp_s_a = true;\n } else {\n tp_a = null; tp_s_a = false;\n }\n\n if ( tp_trl && tp_trl > 0 && tp_trl < 4 ) {\n flow.set('tp_trl_a', tp_trl, 'file'); tp_trl_s_a = true;\n } else {\n tp_trl_a = null; tp_trl_s_a = false;\n }\n\n if ( sl && tp && tp > 0 && tp < 6 ) {\n flow.set('sl_a', sl, 'file'); sl_s_a = true;\n } else {\n sl_a = null; sl_s_a = false;\n }\n\n if ( sl_trl && sl_trl > 0 && sl_trl < 4 ) {\n flow.set('sl_trl_a', sl_trl, 'file');sl_trl_s_a = true;\n } else {\n sl_trl_a = null; sl_trl_s_a = false;\n }\n\n if ( tm && tm > 0 && tm < 4 ) {\n flow.set('tm_a', tm, 'file'); tm_s_a = true;\n } else {\n tm_a = null; tm_s_a = false;\n }\n }\n\n\n msg.payload = `${flow.get('amt_a', 'file')} | P: ${flow.get('tp_a', 'file')} : ${flow.get('tp_trl_a', 'file')} | L: ${flow.get('sl_a', 'file')} : ${flow.get('sl_trl_a', 'file')} | T: ${flow.get('tm_a', 'file')} | ${flow.get('int', 'file')}`\n msg.color = \"#fdef55\"\n\n}\n\n\nif (clear === true) { \n msg.payload = \"\"\n\n}\n\nreturn msg\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":300,"wires":[["be5d13054b91c01e","6693d184f84d71f0"]]},{"id":"be5d13054b91c01e","type":"ui_text","z":"d69bda8308d00eeb","group":"29525d7c67fd22a4","order":2,"width":3,"height":1,"name":"values","label":"","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-spread","className":"values","x":1070,"y":300,"wires":[]},{"id":"c4c964234a682810","type":"ui_multistate_switch","z":"d69bda8308d00eeb","name":"mode","group":"29525d7c67fd22a4","order":4,"width":2,"height":1,"label":"","stateField":"payload.state","enableField":"enable","passthroughField":"passthrough","inputMsgField":"inputmsg","rounded":true,"useThemeColors":false,"hideSelectedLabel":false,"multilineLabel":false,"passThrough":"always","inputMsg":"all","userInput":"enabled_show","options":[{"label":" ","value":"d","valueType":"str","color":"#1e2223"},{"label":" ","value":"y","valueType":"str","color":"#1e2223"},{"label":"<i class=\"fa fa-cloud-upload\"></i>","value":"M","valueType":"str","color":"#ff0000"},{"label":"<i class=\"fa fa-database\"></i>","value":"A","valueType":"str","color":"#0042ad"}],"topic":"mode","x":630,"y":340,"wires":[["37755b5ae569b01c","7286bcae0568bf2c","53cd765aaf814d43"]]},{"id":"53cd765aaf814d43","type":"function","z":"d69bda8308d00eeb","name":"FUNC","func":"// Missing assignments\nconst msgCRYPT={}; \nconst msgSET = {}; \nconst msgTDV = {};\n\nlet topic = msg.topic\n\nlet {state, amt, tp, tp_trl, sl, sl_trl, tm, currency, exchange, coin, exch, m15, m30, h1, h2, sav, clear = false} = msg.payload\n\nlet b_coin, f_coin, g_coin, win\n\nlet amt_a, tp_a, tp_trl_a, sl_a, sl_trl_a, tm_a, tp_s, sl_s, tp_s_a, sl_s_a, tp_trl_s, tp_trl_s_a, sl_trl_s, sl_trl_s_a, tm_s, tm_s_a, P, L, P_a, L_a, T, T_a\n\n\nif (!m15) {\n m15 = false\n}\nflow.set ('m15', m15)\n\nif (!m30) {\n m30 = false\n}\nflow.set ('m30', m30)\n\nif (!h1) {\n h1 = false\n}\nflow.set ('h1', h1)\n\nif (!h2) {\n h2 = false\n\n}\nflow.set ('h2', h2)\n\n // Test of Load button\n if (topic.toLowerCase() === 'load') {\n return [msg, null, null]\n\n }\n\n\n// ALERT \nif ((msg.topic === \"alert\") || (msg.topic === \"reset\")) {\n\n let {currency, exchange, percent, window, note} = msg.payload\n flow.set('currency', currency)\n flow.set('exchange', exchange)\n flow.set('percent', percent)\n flow.set('note', note)\n flow.set('f_coin', currency + '/USD')\n flow.set('g_coin', currency + '_USDT')\n flow.set('b_coin', currency + 'USDT')\n\n\n msgTDV.payload = currency + \"USDT\"\n\n if (window === \"10 minutes\") {\n win = \"10m\"\n } else if (window === \"15 minutes\") {\n win = \"15m\"\n } else if (window === \"5 minutes\") {\n win = \"5m\"\n } else if (window === \"3 minutes\") {\n win = \"3m\"\n } else if (window == \"1 minutes\") {\n win = \"1m\"\n } \n\n flow.set('win', win)\n\n return [msgCRYPT, null, msgTDV]\n\n}\n\n\n// Check as moved the } to include return in 'if' block\nif (coin) {\n flow.set('currency', coin.toUpperCase())\n flow.set('exchange', exch)\n\n msgTDV.payload = `${flow.get('currency')}USDT`\n\n return [msgCRYPT, null, msgTDV]\n}\n\n\n\n// SCREENER\nif (msg.topic === \"screener\") {\n let data = msg.payload[0]\n\n return [msgCRYPT, null, msgTDV]\n\n// Save incoming object without property 'window'. Note there are many ways to do this\n// example: delete data.window; msg.payload = data\n// msg.payload = {volume: data.volume, exchange: data.exchange}\n\n}\n\n// SET \nif (msg.topic === \"mode\") {\n flow.set('state', state);\n\n}\n\nif (flow.get('state') === \"M\") {\n\n // If SET Button pressed\n if (sav) {\n\n if ( amt && amt > 19 && amt < 1001 ) {\n flow.set('amt', amt)\n } else {\n amt = null\n } \n\n if ( tp && tp > 0 && tp < 16 ) {\n flow.set('tp', tp);\n tp_s = true;\n } else {\n tp = null;\n tp_s = false;\n \n }\n \n flow.set('tp_s', tp_s);\n\n if ( tp_trl && tp_trl > 0 && tp_trl < 4 ) {\n flow.set('tp_trl', tp_trl);\n tp_trl_s = true;\n } else {\n tp_trl = null;\n tp_trl_s = false;\n \n } \n \n flow.set('tp_trl_s', tp_trl_s);\n\n if ( sl && tp && tp > 0 && tp < 6 ) {\n flow.set('sl', sl);\n sl_s = true;\n } else {\n sl = null;\n sl_s = false;\n \n }\n \n flow.set('sl_s', sl_s);\n\n if ( sl_trl && sl_trl > 0 && sl_trl < 4 ) {\n flow.set('sl_trl', sl_trl);\n sl_trl_s = true;\n } else {\n sl_trl = null;\n sl_trl_s = false;\n \n }\n \n flow.set('sl_trl_s', sl_trl_s);\n\n if ( tm && tm > 0 && tm < 4 ) {\n flow.set('tm', tm)\n tm_s = true;\n\n } else {\n tm = null;\n tm_s = false;\n \n }\n \n flow.set('tm_s', tm_s);\n\n }\n\n\n \n// if(tp_s) {P = \"${flow.get('tp')} : ${flow.get('tp_trl')}\"} else {P = \"\"} \n// msg.payload = `${flow.get('amt')} | L: ${flow.get('sl')} : ${flow.get('sl_trl')} | T ${flow.get('tm')} | ${flow.get('int', 'file')}`\n \n msgSET.payload = `${flow.get('amt')} | P: ${flow.get('tp')} : ${flow.get('tp_trl')} | L: ${flow.get('sl')} : ${flow.get('sl_trl')} | T: ${flow.get('tm')} | ${flow.get('int', 'file')}`\n msgSET.color = \"#777777\"\n\n return [null, msgSET, null]\n\n \n\n} else if (flow.get('state') === \"A\") {\n \n if (sav) {\n\n if ( amt && amt > 0 && amt < 1001 ) {\n flow.set('amt_a', amt, 'file')\n } else {\n amt_a = null\n }\n\n if ( tp && tp > 0 && tp < 16 ) {\n flow.set('tp_a', tp, 'file'); tp_s_a = true;\n } else {\n tp_a = null; tp_s_a = false;\n }\n\n if ( tp_trl && tp_trl > 0 && tp_trl < 4 ) {\n flow.set('tp_trl_a', tp_trl, 'file'); tp_trl_s_a = true;\n } else {\n tp_trl_a = null; tp_trl_s_a = false;\n }\n\n if ( sl && tp && tp > 0 && tp < 6 ) {\n flow.set('sl_a', sl, 'file'); sl_s_a = true;\n } else {\n sl_a = null; sl_s_a = false;\n }\n\n if ( sl_trl && sl_trl > 0 && sl_trl < 4 ) {\n flow.set('sl_trl_a', sl_trl, 'file');sl_trl_s_a = true;\n } else {\n sl_trl_a = null; sl_trl_s_a = false;\n }\n\n if ( tm && tm > 0 && tm < 4 ) {\n flow.set('tm_a', tm, 'file'); tm_s_a = true;\n } else {\n tm_a = null; tm_s_a = false;\n }\n }\n\n msgSET.payload = `${flow.get('amt_a', 'file')} | P: ${flow.get('tp_a', 'file')} : ${flow.get('tp_trl_a', 'file')} | L: ${flow.get('sl_a', 'file')} : ${flow.get('sl_trl_a', 'file')} | T: ${flow.get('tm_a', 'file')} | ${flow.get('int', 'file')}`\n msgSET.color = \"#fdef55\"\n\n return [null, msgSET, null] \n}\n\nif (clear === true) { \n msgSET.payload = \"\"\n\n return [null, msgSET, null]\n\n}\n\n\n\n\n\n\n\n /** \n * Template literal\n * `string text ${expression} string text`\n */","outputs":3,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1130,"y":160,"wires":[["9de5166ed381165f"],["3cec316eb141e997"],["679c3a9a867b750c"]]},{"id":"f8068258c9fe415a","type":"ui_template","z":"d69bda8308d00eeb","group":"29525d7c67fd22a4","name":"INPUT","order":5,"width":8,"height":5,"format":"\n<div style = \"padding: 5px 5px 0px 0px\" layout = \"row\">\n\n <div flex = \"50\"> \n\n <div style = \"margin-top: 5px\" layout = \"row\">\n <div style = \"margin-top:25px\" flex = \"30\"> \n <md-radio-group ng-model = \"exch\" ng-change = \"changeradio()\" ng-init = \"exch = 'Gate.io'\">\n <md-radio-button ng-model = \"exch.Paper\" value = \"Paper\" class = \"md-primary\">P</md-radio-button>\n <md-radio-button ng-model = \"exch.Binance\" value = \"Binance\" class = \"md-primary\">B</md-radio-button>\n <md-radio-button ng-model = \"exch.FTX\" value = \"FTX\">F</md-radio-button>\n <md-radio-button ng-model = \"Gate.io\" data-ng-checked = \"true\" value = \"Gate.io\">G</md-radio-button>\n </md-radio-group>\n </div>\n \n <div layout = \"column\" style = \"margin: 10px 0px 0px 0px\" flex = \"55\">\n <div style = \"margin-left:-10px\" flex = \"\" layout = \"row\">\n <div style = \"margin-left:0px\"><md-checkbox ng-model = \"m15\" ng-change = \"tdv('m15')\" aria-label = \"m15\"><span style = \"font-size:11px\">15</span></md-checkbox></div>\n <div style = \"margin-left:7px\"><md-checkbox ng-model = \"m30\" ng-change = \"tdv('m30')\" aria-label = \"m30\"><span style=\"font-size:11px\">30</span></md-checkbox></div>\n <div style = \"margin-left:7px\"><md-checkbox ng-model = \"h1\" ng-change = \"tdv('h1')\" aria-label = \"h1\"><span style=\"font-size:11px\">1h</span></md-checkbox></div> \n <div style = \"margin-left:7px\"><md-checkbox ng-model = \"h2\" ng-change = \"tdv('h2')\" aria-label = \"h2\"><span style=\"font-size:11px\">2h</span></md-checkbox></div>\n </div> \n <div flex = \"\" style =\"text-align:center; margin-top:-7px; margin-left:40px;\">\n <md-input-container><input aria-label = \"coin\" ng-model = \"coin\"></md-input-container>\n </div>\n <div flex=\"\" style = \"margin-top:0px; margin-left:35px; \">\n <md-button aria-label = \"load\" class = \"md-accent md-hue-2 md-raised\" ng-click = \"send({topic: 'load', payload:{exch:exch, coin:coin, m15:m15, m30:m30, h1:h1, h2:h2}})\">LOAD</md-button>\n </div>\n </div>\n </div>\n </div>\n\n<div flex=\"50\" style=\"border-left:1px solid #434651; padding-left:10px\"> \n<div flex=\"\" layout=\"row\">\n <div flex=\"22\" style=\"padding:0 5px\"> \n <div style=\"text-align:center\"><md-input-container><input ng-model=\"tp\" aria-label=\"tp\"><span class=mylabel>TP</span></md-input-container></div> \n </div>\n\n <div flex=\"20\" style=\"padding:0 5px\"> \n <div style=\"text-align:center\"><md-input-container><input ng-model=\"tp_trl\" aria-label=\"tp_trl\"><span class=mylabel>P🡅</span></md-input-container></div> \n </div>\n\n <div flex=\"20\" style=\"padding:0 5px\"> \n <div style=\"text-align:center\"><md-input-container><input ng-model=\"sl\" aria-label=\"sl\"><span class=mylabel>SL</span></md-input-container></div>\n </div>\n\n <div flex=\"20\" style=\"padding:0 5px\"> \n <div style=\"text-align:center\"><md-input-container><input aria-label=\"sl_trl\" ng-model=\"sl_trl\"><span class=mylabel>L🡅</span></md-input-container></div> \n </div>\n \n <div flex=\"18\" style=\"padding:0 5px\">\n <div style=\"text-align:center\"><md-input-container><input aria-label=\"tm\" ng-model=\"tm\"><span class=mylabel>TM</span></md-input-container></div> \n </div>\n</div>\n\n<div flex=\"\" style=\"margin: 5px 5px 0px 5px\" layout=\"row\">\n \n <div flex=\"40\" layout=\"column\"> \n <div style=\"margin-top:25px\" flex=\"\" layout=\"row\">\n <div style=\"padding-left:10px\"><md-checkbox ng-model = \"sav\" aria-label = \"sav\"><i class = \"fa fa-unlock-alt\" aria-hidden = \"true\"></i></md-checkbox></div> \n <!-- added ng-change = \"clear_form()\" -->\n <div style=\"margin-left:10px\"><md-checkbox ng-model = \"apocalypse\" ng-change = \"apocalypse()\" aria-label = \"apocalypse\"><i class=\"fa fa-circle-o\" aria-hidden=\"true\"></i></md-checkbox></div>\n </div> \n <!-- color:{{msg.colour}} not used so removed. Added ng-click = \"regular_plus()\" to action function --> \n <div style=\"margin: -10px 0px 0px 5px\"><md-button class = \"remote-button\" ng-click = \"clear_form()\"><span style=\"font-size:15px !important; width: 50px !important; color: {{msg.colour}}\" class = \"fa fa-window-restore\"> </span></md-button></div> \n </div>\n <div style=\"margin-left:20px\" flex=\"45\" layout=\"column\">\n <div style=\"margin:5px 0px 0px 15px; text-align:center\"><md-input-container><input aria-label = \"amt\" ng-model = \"amt\"></md-input-container></div>\n <!-- changed tm:tml to tm:tm as could not find tml, changed aut to sav -->\n <div style=\"margin:-8px 0px 0px 10px\"><md-button aria-label = \"set\" class = \"md-accent md-hue-2 md-raised\" ng-click = \"send({topic: 'set', payload:{amt:amt, sav:sav, sl_trl:sl_trl, sl:sl, tp:tp, tp_trl:tp_trl, tm:tm, m15:m15, m30:m30, h1:h1, h2:h2}})\">SET</md-button></div>\n </div>\n </div>\n</div>\n\n\n<script>\n\n(function(scope) {\n\n // Set local variables. Could also set them to default values\n let local_amt\n let local_sl_trl\n let local_sl\n let local_tp\n let local_tp_trl\n let local_tm\n let local_coin\n\n // Variables used in the form\n scope.amt = local_amt\n scope.sl_trl = local_sl_trl\n scope.sl = local_sl\n scope.tp = local_tp\n scope.tp_trl = local_tp_trl\n scope.tm = local_tm\n scope.coin = local_coin\n\n scope.clear = false\n scope.sav = false\n scope.m15 = false\n scope.m30 = false\n scope.h1 = false\n scope.h2 = false\n\n // Clear form\n scope.clear_form = function() {\n local_amt = ''\n local_sl_trl = ''\n local_sl = ''\n local_tp = ''\n local_tp_trl = ''\n local_tm = ''\n local_coin = ''\n\n showChange()\n\n }\n \n scope.tdv = function(boxChecked) {\n scope.send({topic: 'tdv', payload:{m15: scope.m15, m30: scope.m30, h1: scope.h1, h2: scope.h2}})\n\n }\n\n scope.change_radio = function(){\n scope.send({topic: 'Exchange', payload: 'None'})\n }\n\n scope.$watch('msg', function(msg) {\n // No error checking for properties\n if(msg) {\n local_amt = msg.payload.amt\n local_sl_trl = msg.payload.sl_trl\n local_sl = msg.payload.sl\n local_tp = msg.payload.tp\n local_tp_trl = msg.payload.tp_trl\n local_tm = msg.payload.tm\n scope.clear = msg.payload.clear\n\n // Set to false so any incoming msg does not action following function\n msg.payload.sav = false \n\n showChange()\n\n scope.send(msg)\n }\n })\n \n // Update the scope variables to reflect back to the HTML\n function showChange() {\n scope.amt = local_amt\n scope.sl_trl = local_sl_trl\n scope.sl = local_sl\n scope.tp = local_tp\n scope.tp_trl = local_tp_trl\n scope.tm = local_tm\n scope.coin = local_coin\n \n }\n\n\n})(scope);\n</script>","storeOutMessages":false,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","className":"setbox","x":630,"y":240,"wires":[["37755b5ae569b01c","6bdc77e313b0aa7d","53cd765aaf814d43"]]},{"id":"427dd8c9300133e1","type":"debug","z":"d69bda8308d00eeb","name":"Currency Defaults","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":690,"y":480,"wires":[]},{"id":"26ccf8cf3164821c","type":"inject","z":"d69bda8308d00eeb","name":"Set Defaultd Manually","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":320,"wires":[["dcae8eef8641461b","9814b6e83a2c8ddd","8d1d5b384969e0bf"]]},{"id":"8ae906e22a6fc9ce","type":"debug","z":"d69bda8308d00eeb","name":"Default Values","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":420,"y":220,"wires":[]},{"id":"6bdc77e313b0aa7d","type":"debug","z":"d69bda8308d00eeb","name":"Form Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":850,"y":220,"wires":[]},{"id":"7286bcae0568bf2c","type":"debug","z":"d69bda8308d00eeb","name":"Mode Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":850,"y":420,"wires":[]},{"id":"6693d184f84d71f0","type":"debug","z":"d69bda8308d00eeb","name":"Display","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1080,"y":360,"wires":[]},{"id":"9de5166ed381165f","type":"debug","z":"d69bda8308d00eeb","name":"Function Output 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1430,"y":120,"wires":[]},{"id":"3cec316eb141e997","type":"debug","z":"d69bda8308d00eeb","name":"Function Output 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1430,"y":160,"wires":[]},{"id":"679c3a9a867b750c","type":"debug","z":"d69bda8308d00eeb","name":"Function Output 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1430,"y":200,"wires":[]},{"id":"8d1d5b384969e0bf","type":"change","z":"d69bda8308d00eeb","name":"Mode Defaults","rules":[{"t":"set","p":"payload","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"color","pt":"msg","to":"Red","tot":"str"},{"t":"set","p":"payload.state","pt":"msg","to":"A","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":360,"wires":[["c4c964234a682810"]]},{"id":"29525d7c67fd22a4","type":"ui_group","name":"LEFT","tab":"7e13e6107768d821","order":3,"disp":false,"width":8,"collapse":false,"className":""},{"id":"7e13e6107768d821","type":"ui_tab","name":"CRYPTO","icon":"dashboard","order":2,"disabled":false,"hidden":false}]