Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "2b1c064.57a53fa",
- "type": "tab",
- "label": "CryptoSignal_TradeAlerts_v0.03",
- "disabled": false,
- "info": ""
- },
- {
- "id": "e07887aa.9feca8",
- "type": "http in",
- "z": "2b1c064.57a53fa",
- "name": "Crypto-Signals",
- "url": "/cryptosignals",
- "method": "post",
- "upload": false,
- "swaggerDoc": "",
- "x": 177,
- "y": 107.75,
- "wires": [
- [
- "b305f298.4f6cd",
- "c9a1c135.ef996"
- ]
- ]
- },
- {
- "id": "b305f298.4f6cd",
- "type": "http response",
- "z": "2b1c064.57a53fa",
- "name": "",
- "statusCode": "",
- "headers": {},
- "x": 414,
- "y": 107.75,
- "wires": []
- },
- {
- "id": "c9a1c135.ef996",
- "type": "function",
- "z": "2b1c064.57a53fa",
- "name": "Parser",
- "func": "var string = msg.payload.messages;\nvar obj = JSON.parse(string);\nmsg.payload = obj;\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "x": 144.00003051757812,
- "y": 194.75,
- "wires": [
- [
- "cf73616b.df6be"
- ]
- ]
- },
- {
- "id": "cf73616b.df6be",
- "type": "split",
- "z": "2b1c064.57a53fa",
- "name": "Splitter",
- "splt": "\\n",
- "spltType": "str",
- "arraySplt": 1,
- "arraySpltType": "len",
- "stream": false,
- "addname": "",
- "x": 290.0000305175781,
- "y": 194.75,
- "wires": [
- [
- "18e5bc3d.5558b4"
- ]
- ]
- },
- {
- "id": "18e5bc3d.5558b4",
- "type": "switch",
- "z": "2b1c064.57a53fa",
- "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": 468.0000305175781,
- "y": 194.75,
- "wires": [
- [
- "421e572b.cfa508"
- ],
- [
- "128e2c91.d947a3"
- ],
- [
- "218be0e3.15da4"
- ],
- [
- "3441ce0f.53f612"
- ],
- [
- "bf09db41.b85788"
- ]
- ]
- },
- {
- "id": "421e572b.cfa508",
- "type": "change",
- "z": "2b1c064.57a53fa",
- "name": "Set flow variables for Current Prices and RSI",
- "rules": [
- {
- "t": "set",
- "p": "currentprices",
- "pt": "flow",
- "to": "payload.prices",
- "tot": "jsonata"
- },
- {
- "t": "set",
- "p": "currentrsivalue",
- "pt": "flow",
- "to": "payload.values.rsi",
- "tot": "jsonata"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 816.2500305175781,
- "y": 138,
- "wires": [
- []
- ]
- },
- {
- "id": "128e2c91.d947a3",
- "type": "change",
- "z": "2b1c064.57a53fa",
- "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": 775.2500305175781,
- "y": 181,
- "wires": [
- []
- ]
- },
- {
- "id": "218be0e3.15da4",
- "type": "change",
- "z": "2b1c064.57a53fa",
- "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": 775.2500305175781,
- "y": 234,
- "wires": [
- []
- ]
- },
- {
- "id": "3441ce0f.53f612",
- "type": "change",
- "z": "2b1c064.57a53fa",
- "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": 756.2500305175781,
- "y": 289,
- "wires": [
- []
- ]
- },
- {
- "id": "1115f40a.ae8a1c",
- "type": "comment",
- "z": "2b1c064.57a53fa",
- "name": "Flow for Crypto Signals",
- "info": "Signals received from Crypto-Signals webhook",
- "x": 197.25003051757812,
- "y": 58,
- "wires": []
- },
- {
- "id": "e044778a.4079c8",
- "type": "function",
- "z": "2b1c064.57a53fa",
- "name": "Create trade alert",
- "func": "msg.payload = {chatId : enter_your_telegram_chatid_here, type : 'message', content: \"All criteria met. 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": 453.2500305175781,
- "y": 407.66668701171875,
- "wires": [
- [
- "f39d5270.4f59c",
- "ec2f3665.5e0b48"
- ]
- ]
- },
- {
- "id": "f9193e10.9870c",
- "type": "comment",
- "z": "2b1c064.57a53fa",
- "name": "Check for criteria match",
- "info": "",
- "x": 193.25003051757812,
- "y": 319.66668701171875,
- "wires": []
- },
- {
- "id": "27937a7e.74eb66",
- "type": "function",
- "z": "2b1c064.57a53fa",
- "name": "Create message for do nothing",
- "func": "msg.payload = \"Do nothing! Criteria not met - Close: \" + 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": 492.2500305175781,
- "y": 360.66668701171875,
- "wires": [
- [
- "58c9ca29.620124"
- ]
- ]
- },
- {
- "id": "ec2f3665.5e0b48",
- "type": "telegram sender",
- "z": "2b1c064.57a53fa",
- "name": "Send trade alert to Telegram",
- "bot": "",
- "x": 831.2500305175781,
- "y": 407.66668701171875,
- "wires": [
- []
- ]
- },
- {
- "id": "f39d5270.4f59c",
- "type": "debug",
- "z": "2b1c064.57a53fa",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "x": 782.2500305175781,
- "y": 469.66668701171875,
- "wires": []
- },
- {
- "id": "bf09db41.b85788",
- "type": "function",
- "z": "2b1c064.57a53fa",
- "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": 210.25003051757812,
- "y": 378.66668701171875,
- "wires": [
- [
- "27937a7e.74eb66"
- ],
- [
- "e044778a.4079c8"
- ]
- ]
- },
- {
- "id": "58c9ca29.620124",
- "type": "debug",
- "z": "2b1c064.57a53fa",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "x": 781.25,
- "y": 360.66668701171875,
- "wires": []
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement