Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "829d5010.37065",
- "type": "tab",
- "label": "CryptoSignal_TradeAlerts_v0.04",
- "disabled": false,
- "info": ""
- },
- {
- "id": "7a7fc1d8.c924f",
- "type": "http in",
- "z": "829d5010.37065",
- "name": "Crypto-Signals",
- "url": "/cryptosignals",
- "method": "post",
- "upload": false,
- "swaggerDoc": "",
- "x": 157,
- "y": 95.75,
- "wires": [
- [
- "4361a4e6.5373ac",
- "98901d43.8439a"
- ]
- ]
- },
- {
- "id": "4361a4e6.5373ac",
- "type": "http response",
- "z": "829d5010.37065",
- "name": "",
- "statusCode": "",
- "headers": {},
- "x": 394,
- "y": 95.75,
- "wires": []
- },
- {
- "id": "98901d43.8439a",
- "type": "function",
- "z": "829d5010.37065",
- "name": "Parser",
- "func": "var string = msg.payload.messages;\nvar obj = JSON.parse(string);\nmsg.payload = obj;\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "x": 124.00003051757812,
- "y": 182.75,
- "wires": [
- [
- "1f760789.f031d8"
- ]
- ]
- },
- {
- "id": "1f760789.f031d8",
- "type": "split",
- "z": "829d5010.37065",
- "name": "Splitter",
- "splt": "\\n",
- "spltType": "str",
- "arraySplt": 1,
- "arraySpltType": "len",
- "stream": false,
- "addname": "",
- "x": 270.0000305175781,
- "y": 182.75,
- "wires": [
- [
- "347ae168.04f5ce"
- ]
- ]
- },
- {
- "id": "347ae168.04f5ce",
- "type": "switch",
- "z": "829d5010.37065",
- "name": "IndicatorType",
- "property": "payload.indicator",
- "propertyType": "msg",
- "rules": [
- {
- "t": "eq",
- "v": "rsi",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "stoch_rsi",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "momentum",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "mfi",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "std_crossover",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 5,
- "x": 448.0000305175781,
- "y": 182.75,
- "wires": [
- [
- "f1a45db5.5fb94"
- ],
- [
- "77164366.1a247c"
- ],
- [
- "25e68347.83d71c"
- ],
- [
- "520fae02.ac7ef"
- ],
- [
- "8a31c682.c62618"
- ]
- ]
- },
- {
- "id": "f1a45db5.5fb94",
- "type": "change",
- "z": "829d5010.37065",
- "name": "Set flow variables for Current Prices, RSI and Market",
- "rules": [
- {
- "t": "set",
- "p": "currentprices",
- "pt": "flow",
- "to": "payload.prices",
- "tot": "jsonata"
- },
- {
- "t": "set",
- "p": "currentrsivalue",
- "pt": "flow",
- "to": "payload.values.rsi",
- "tot": "jsonata"
- },
- {
- "t": "set",
- "p": "currentmarketpair",
- "pt": "flow",
- "to": "payload.market",
- "tot": "jsonata"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 826.2500305175781,
- "y": 126,
- "wires": [
- []
- ]
- },
- {
- "id": "77164366.1a247c",
- "type": "change",
- "z": "829d5010.37065",
- "name": "Set flow variable for Stoch_RSI",
- "rules": [
- {
- "t": "set",
- "p": "currentstochrsivalue",
- "pt": "flow",
- "to": "msg.payload.values.stoch_rsi",
- "tot": "jsonata"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 755.2500305175781,
- "y": 169,
- "wires": [
- []
- ]
- },
- {
- "id": "25e68347.83d71c",
- "type": "change",
- "z": "829d5010.37065",
- "name": "Set flow variable for momentum",
- "rules": [
- {
- "t": "set",
- "p": "currentmomentumvalue",
- "pt": "flow",
- "to": "\"Momentum : \" & msg.payload.values.momentum",
- "tot": "jsonata"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 755.2500305175781,
- "y": 222,
- "wires": [
- []
- ]
- },
- {
- "id": "520fae02.ac7ef",
- "type": "change",
- "z": "829d5010.37065",
- "name": "Set flow variable for mfi",
- "rules": [
- {
- "t": "set",
- "p": "currentmfivalue",
- "pt": "flow",
- "to": "\"MFI : \" & msg.payload.values.mfi",
- "tot": "jsonata"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 736.2500305175781,
- "y": 277,
- "wires": [
- []
- ]
- },
- {
- "id": "ef0c9331.dbfe9",
- "type": "comment",
- "z": "829d5010.37065",
- "name": "Flow for Crypto Signals",
- "info": "Signals received from Crypto-Signals webhook",
- "x": 177.25003051757812,
- "y": 46,
- "wires": []
- },
- {
- "id": "617f11b9.97655",
- "type": "function",
- "z": "829d5010.37065",
- "name": "Create trade alert",
- "func": "msg.payload = {chatId : enter_your_telegram_chatid_here, type : 'message', content: \"All criteria met for Market Pair: \" + flow.get('currentmarketpair') + \". Check the charts! - Close Price: \" + msg.payload.values.close_0 + \" vs Bollinger Upperband: \" + msg.payload.values.upperband_0 + \"Stoch_RSI is \" + flow.get('currentstochrsivalue')};\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "x": 433.2500305175781,
- "y": 395.66668701171875,
- "wires": [
- [
- "e2b0c14d.63f6f",
- "29a9498d.9bd196"
- ]
- ]
- },
- {
- "id": "82717a18.830de8",
- "type": "comment",
- "z": "829d5010.37065",
- "name": "Check for criteria match",
- "info": "",
- "x": 173.25003051757812,
- "y": 307.66668701171875,
- "wires": []
- },
- {
- "id": "6dbaf91d.fc0b38",
- "type": "function",
- "z": "829d5010.37065",
- "name": "Create message for do nothing",
- "func": "msg.payload = \"Do nothing! Criteria not met for Market Pair: \" + flow.get('currentmarketpair') + \" - Close Price: \" + msg.payload.values.close_0 + \" vs Bollinger Upperband: \" + msg.payload.values.upperband_0 + \" and Stoch_RSI is \" + flow.get('currentstochrsivalue');\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "x": 472.2500305175781,
- "y": 348.66668701171875,
- "wires": [
- [
- "622f5815.faa818"
- ]
- ]
- },
- {
- "id": "29a9498d.9bd196",
- "type": "telegram sender",
- "z": "829d5010.37065",
- "name": "Send trade alert to Telegram",
- "bot": "",
- "x": 811.2500305175781,
- "y": 395.66668701171875,
- "wires": [
- []
- ]
- },
- {
- "id": "e2b0c14d.63f6f",
- "type": "debug",
- "z": "829d5010.37065",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "x": 762.2500305175781,
- "y": 457.66668701171875,
- "wires": []
- },
- {
- "id": "8a31c682.c62618",
- "type": "function",
- "z": "829d5010.37065",
- "name": "Evaluate Criteria",
- "func": "if (msg.payload.values.close_0 > msg.payload.values.upperband_0 && flow.get('currentstochrsivalue') > 80) {\n return [ null, msg ];\n} else {\n return [ msg, null ];\n}",
- "outputs": 2,
- "noerr": 0,
- "x": 190.25003051757812,
- "y": 366.66668701171875,
- "wires": [
- [
- "6dbaf91d.fc0b38"
- ],
- [
- "617f11b9.97655"
- ]
- ]
- },
- {
- "id": "622f5815.faa818",
- "type": "debug",
- "z": "829d5010.37065",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "x": 761.2500305175781,
- "y": 348.66668701171875,
- "wires": []
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement