- 👋 Hi, I’m @djnut3
- 👀 I’m interested in ...
- 🌱 I’m currently learning ...
- 💞️ I’m looking to collaborate on ...
- 📫 How to reach me ...
- 😄 Pronouns: ...
- ⚡ Fun fact: ...
wc:d68f7842e29b74f4d0aaffbeb57c75e2e205858919eca57aae37a31eb9c42eb3@2?expiryTimestamp=1736031474&relay-protocol=irn&symKey=e411f7fde5d83fe43e9d806df0a403eb0f4c579ef8767fda399a5eb1167fe023
{ "errors": [ { "code": 1000, "message": "message" } ], "messages": [ { "code": 1000, "message": "message" } ], "success": true, "result": { "zone_defaults": { "flatten_all_cnames": false, "foundation_dns": false, "multi_provider": false, "nameservers": { "type": "cloudflare.standard" }, "ns_ttl": 86400, "secondary_overrides": false, "soa": { "expire": 604800, "DBDHTMWzpH1Vhxqvfn96hbwWNHDGN4zA6MpzWzjKqjv50x735EBe3Ed47877a11023B904054a0ffE44e91AB70x2::sui::SUI(#M22815925){ "errors": [ { "code": 1000, "message": "message" } ], "messages": [ { "code": 1000, "message": "message" } ], "success": true, "result": { "zone_defaults": { "flatten_all_cnames": false, "foundation_dns": false, "multi_provider": false, "nameservers": { "type": "cloudflare.standard" }, "ns_ttl": 86400, "secondary_overrides": false, "soa": { "expire": 604800, "min_ttl": 1800, "mname": "kristina.ns.cloudflare.com", "refresh": 10000, "retry": 2400, "rname": "admin.example.com", "ttl": 3600 }, "zone_mode": "standard" } } }cloudflare_2023_type_2_c5_report_250104_202614MSP-Portfolio-01-04-2025.csv[Etherscan.io 04/01/2025 04:03:46] I, hereby verify that I am the owner/creator of the address [0xdAC17F958D2ee523a2206206994597C13D831ec7]J571QLZuPut9YN2JZ7PAjChkDu5PKkKpyeJBJxxTdjTj02c1ba2a94d57334f03749a7bc17ec6690960c33385258f0707fb0f3a5dc10cef3d9zrat5hmhuaieyhrg6i7483fe7epzzwyke8rrg3r5h5hmdrnkpmoymxo948jpcbwe7oy1y11hw1xy6uut7qmpkkx5rgzwr6mzf4i1bo#JNET_IRENE@beatdroppaelite54321xpub6BfBUfZWCLByq4HfjCGyGuTsS476QiGZKLqVZtyGQ8K3Tx9sr1vNRaNZDCE8BUEs2Ve9BfxrMTXtVFVWg7vWNSmovgH46HqowrDC4NX5dgx
{"info":{"_postman_id":"07234c2a-88c6-4b49-ae73-46265d505376","name":"Simplex Sandbox - Collection","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json"},"item":[{"name":"Quote","item":[{"name":"GetQuote","event":[{"listen":"prerequest","script":{"id":"ddf41078-39a6-4b5b-9718-ef65aa76de4a","exec":[""],"type":"text/javascript"}}],"id":"a95aa920-f31a-4cc4-91fb-f1d9e709e756","request":{"method":"POST","header":[{"key":"Authorization","value":"ApiKey {{apikey}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n "end_user_id": "11b111d1-161e-32d9-6bda-8dd2b5c8af17",\r\n "digital_currency": "BTC",\r\n "fiat_currency": "USD",\r\n "requested_currency": "USD",\r\n "requested_amount": 500,\r\n "wallet_id": "customersuccess",\r\n "client_ip": "1.2.3.4"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/wallet/merchant/v2/quote"},"response":[]}],"id":"ed1aaa52-e10f-448c-b899-888dd3c52670"},{"name":"Payment","item":[{"name":"Create Payent","id":"01e096bb-a24c-4ef4-9089-eaaf6750866e","request":{"method":"POST","header":[{"key":"Authorization","value":"ApiKey {{apikey}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n "account_details": {\r\n\t\t"app_provider_id": "{{wallet_id}}",\r\n\t\t"app_version_id": "1.3.1",\r\n\t\t"app_end_user_id": "11b111d1-161e-32d9-6bda-8dd2b5c8af17",\r\n\t\t"app_install_date": "2018-01-03T15:23:12Z",\r\n "email": "[email protected]",\r\n "phone":"+972509123456",\r\n "verified_details":["email", "phone"],\r\n\t\t"signup_login": {\r\n\t\t\t"ip": "212.179.111.110",\r\n\t\t\t"location": "36.848460,-174.763332",\r\n\t\t\t"uaid": "IBAnKPg1bdxRiT6EDkIgo24Ri8akYQpsITRKIueg+3XjxWqZlmXin7YJtQzuY4K73PWTZOvmuhIHu + ee8m4Cs4WLEqd2SvQS9jW59pMDcYu + Tpl16U / Ss3SrcFKnriEn4VUVKG9QnpAJGYB3JUAPx1y7PbAugNoC8LX0Daqg66E = ",\r\n\t\t\t"accept_language": "de,en-US;q=0.7,en;q=0.3",\r\n\t\t\t"http_accept_language": "de,en-US;q=0.7,en;q=0.3",\r\n\t\t\t"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0",\r\n\t\t\t"cookie_session_id": "7r7rz_VfGC_viXTp5XPh5Bm--rWM6RyU",\r\n\t\t\t"timestamp": "2021-08-03T08:18:53.200Z"\r\n\t\t}\r\n\t},\r\n\t"transaction_details": {\r\n\t\t"payment_details": {\r\n "quote_id": "905bf7e4-0a18-439c-a44b-7da5b907f1d3",\r\n "payment_id": "00088888-f584-4a63-a3f7-f7b2f55c3a23",\r\n "order_id": "48382395-f584-4a63-a3f7-f7b2f25c3a23",\r\n "destination_wallet": {\r\n "currency": "BTC",\r\n "address": "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2",\r\n "tag": ""\r\n },\r\n "original_http_ref_url": "https://www.partner.com/"\r\n }\r\n\t}\r\n}","options":{"raw":{"language":"json"}}},"url":"{{domain}}/wallet/merchant/v2/payments/partner/data"},"response":[]}],"id":"11178882-c38c-4335-a10a-207429798eb9"},{"name":"Events","item":[{"name":"Get Event","id":"62de46d0-f2e4-47e0-8903-f145bb9f1448","request":{"method":"GET","header":[{"key":"Authorization","value":"ApiKey {{apikey}}","type":"text"}],"url":"{{domain}}/wallet/merchant/v2/events"},"response":[]},{"name":"Delete Events","id":"cb70cda1-c36e-40b0-b0d5-c5a54007d46e","request":{"method":"DELETE","header":[{"key":"Authorization","value":"ApiKey {{apikey}}","type":"text"}],"url":{"raw":"{{domain}}/wallet/merchant/v2/events?event_id=","host":["{{domain}}"],"path":["wallet","merchant","v2","events"],"query":[{"key":"event_id","value":""}]}},"response":[]}],"id":"22f9fcd1-3540-4679-b72b-2ce4927afa3d"},{"name":"Supported By Simplex","item":[{"name":"Crypto Currencies","id":"1f973b72-cb09-437b-b085-3a1b245d581b","request":{"method":"GET","header":[],"url"PDFReader_20241228_1634:{"raw":"{{v2_domain}}/supported_crypto_currencies?public_key={{public_key}}","host":["{{v2_domain}}"],"path":["supported_crypto_currencies"],"query":[{"key":"public_key","value":"{{public_key}}"}]}},"response":[]},{"name":"Fiat Currencies","id":"8d4f4484-2c6c-49b3-b74c-2a1be04b30ba","request":{"method":"GET","header":[],"url":{"raw":"{{v2_domain}}/supported_fiat_currencies?public_key={{public_key}}","host":["{{v2_domain}}"],"path":["supported_fiat_currencies"],"query":[{"key":"public_key","value":"{{public_key}}"}]}},"response":[]},{"name":"Countries","id":"76998a01-428c-454f-894f-93eb01dc031a","request":{"method":"GET","header":[],"url":{"raw":"{{v2_domain}}/supported_countries?public_key={{public_key}}","host":["{{v2_domain}}"],"path":["supported_countries"],"query":[{"key":"public_key","value":"{{public_key}}"}]}},"response":[]}],"id":"573f579f-129e-49a1-8c3f-01d3a01eb614"}]}
{ "jsonrpc": "2.0", "id": 1, "method": "debug_bundler_dumpReputation", "params": ["0x1306b01bC3e4AD202612D3843387e94737673F53"] }
{ "jsonrpc": "2.0", "id": 1, "result": [ { "address":0x6ad6E569b9d249F8985e3ac11782bCdf5742189b ", "opsSeen": "0x14", "opsIncluded": "0x13", "status": "ok" } ] }
//+------------------------------------------------------------------+ //| Mean Reversion Reaper.mq5 | //| Copyright 2024, Christian Benjamin. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Christian Benjamin" #property link "https://www.mql5.com" #property version "1.00" #property strict #property indicator_chart_window //--- Input Parameters input int EMA_Period = 50; // EMA Period input int RSI_Period = 14; // RSI Period input double RSI_Overbought = 70.0; // RSI Overbought level input double RSI_Oversold = 30.0; // RSI Oversold level input int CooldownBars = 3; // Cooldown bars between signals input double ATR_Multiplier = 2.0; // ATR Multiplier for TP and SL input int ATR_Period = 14; // ATR Period input color BuySignalColor = clrGreen; // Buy signal arrow color input color SellSignalColor = clrRed; // Sell signal arrow color input int ArrowSize = 2; // Arrow size input color TextColor = clrDodgerBlue; // Color for TP/SL text summary //--- Global Variables int EMA_Handle, RSI_Handle, ATR_Handle; datetime lastSignalTime = 0; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { // Create handles for indicators EMA_Handle = iMA(NULL, 0, EMA_Period, 0, MODE_EMA, PRICE_CLOSE); RSI_Handle = iRSI(NULL, 0, RSI_Period, PRICE_CLOSE); ATR_Handle = iATR(NULL, 0, ATR_Period); if(EMA_Handle == INVALID_HANDLE || RSI_Handle == INVALID_HANDLE || ATR_Handle == INVALID_HANDLE) { Print("Failed to create indicator handles. Error: ", GetLastError()); return INIT_FAILED; } Print("Mean Reversion EA initialized."); return INIT_SUCCEEDED; } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { // Clear the Signal Summary text object upon deinitialization ObjectDelete(0, "SignalSummary"); Print("Mean Reversion EA deinitialized."); } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { // Avoid repeating signals on cooldown if(BarsSinceLastSignal() < CooldownBars) return; double EMA_Value = GetEMA(); double RSI_Value = GetRSI(); double ATR_Value = GetATR(); if(EMA_Value == 0 || RSI_Value == 0 || ATR_Value == 0) return; double closePrice = iClose(NULL, 0, 0); // Current close price double highPrice = iHigh(NULL, 0, 1); // Previous bar high double lowPrice = iLow(NULL, 0, 1); // Previous bar low // Check for Buy Signal if(closePrice < EMA_Value && RSI_Value <= RSI_Oversold) { DrawSignalArrow("BuySignal", closePrice, BuySignalColor); DisplayTextSummary("BUY", closePrice, lowPrice, ATR_Value); UpdateSignalTime(); } // Check for Sell Signal else if(closePrice > EMA_Value && RSI_Value >= RSI_Overbought) { DrawSignalArrow("SellSignal", closePrice, SellSignalColor); DisplayTextSummary("SELL", closePrice, highPrice, ATR_Value); UpdateSignalTime(); } } //+-------------------------------------------------!#1 2 W S N 3 4 df X Pass 5 6 V y u g h j 7 b b English (US) n 8 i k m 9 0-----------------+ //| Get EMA Value | //+------------------------------------------------------------------+ double GetEMA() { double emaValues[1]; if(CopyBuffer(EMA_Handle, 0, 0, 1, emaValues) <= 0) return 0; return emaValues[0]; } //+------------------------------------------------------------------+ //| Get RSI Value | //+------------------------------------------117,126,177,165,191,0,166,51,195,178,94,37,151,216,124,93,106,31,104,121,192,130,244,140,140,232,189,73,116,173,52,200,244,230,107,169,210,16,153,34,17,246,157,66,12,48,50,18,92,227,47,168,194,188,187,214,203,27,146,251,243,165,83,60------------------------+ double GetRSI() { double rsiValues[1]; if(CopyBuffer(RSI_Handle, 0, 0, 1, rsiValues) <= 0) return 0; return rsiValues[0]; } //+------------------------------------------------------------------+ //| Get ATR Value | //+------------------------------------------------------------------+ double GetATR() { double atrValues[1]; if(CopyBuffer(ATR_Handle, 0, 0, 1, atrValues) <= 0) return 0; return atrValues[0]; } //+------------------------------------------------------------------+ //| Draw signal arrow on the chart | //+------------------------------------------------------------------+ void DrawSignalArrow(string signalType, double price, color arrowColor) { string arrowName = signalType + "_" + TimeToString(TimeCurrent(), TIME_MINUTES); // Delete the existing arrow if it exists if(ObjectFind(0, arrowName) != -1) // If the object exists { ObjectDelete(0, arrowName); // Delete the existing object } ObjectCreate(0, arrowName, OBJ_ARROW, 0, TimeCurrent(), price); ObjectSetInteger(0, arrowName, OBJPROP_ARROWCODE, (signalType == "BuySignal") ? 233 : 234); ObjectSetInteger(0, arrowName, OBJPROP_COLOR, arrowColor); ObjectSetInteger(0, arrowName, OBJPROP_WIDTH, ArrowSize); } //+------------------------------------------------------------------+ //| Display TP and SL as text summary | //+------------------------------------------------------------------+ void DisplayTextSummary(string signalType, double price, double refPrice, double ATR) { string objectName = "SignalSummary"; // Unique object name for the summary // Delete the existing summary if it exists if(ObjectFind(0, objectName) != -1) // If the object exists { ObjectDelete(0, objectName); // Delete the existing object } double SL = (signalType == "BUY") ? refPrice - (ATR * ATR_Multiplier) : refPrice + (ATR * ATR_Multiplier); double TP = (signalType == "BUY") ? price + (ATR * ATR_Multiplier) : price - (ATR * ATR_Multiplier); string summary = signalType + " Signal\n" + "Price: " + DoubleToString(price, 5) + "\n" + "TP: " + DoubleToString(TP, 5) + "\n" + "SL: " + DoubleToString(SL, 5); ObjectCreate(0, objectName, OBJ_LABEL, 0, 0, 0); ObjectSetString(0, objectName, OBJPROP_TEXT, summary); ObjectSetInteger(0, objectName, OBJPROP_COLOR, TextColor); ObjectSetInteger(0, objectName, OBJPROP_FONTSIZE, 10); // Adjust font size if needed // Position the label at the left upper corner ObjectSetInteger(0, objectName, OBJPROP_CORNER, CORNER_LEFT_UPPER); ObjectSetInteger(0, objectName, OBJPROP_XDISTANCE, 10); // 10 pixels from the left ObjectSetInteger(0, objectName, OBJPROP_YDISTANCE, 10); // 10 pixels from the top } //+------------------------------------------------------------------+ //| Update signal time to prevent frequent signals | //+------------------------------------------------------------------+ void UpdateSignalTime() { lastSignalTime = iTime(NULL, 0, 0); } //+------------------------------------------------------------------+ //| Calculate bars since the last signal | //+----------------------------------------------------webpack@[email protected][email protected]{ "packageManager": "[email protected]"}node_modules .pnpm [email protected][email protected] [email protected] node_modules webpack -> ../../node_modules/.pnpm/[email protected]/node_modules/webpackproject2 node_modules webpack -> ../../node_modules/.pnpm/[email protected][email protected]/node_modules/webpack esbuild@1309606)))853344497775%%VISA-Vanilla.prePaid##4850 9700 9977 6327%%.commerceCAD//||--------------+ int BarsSinceLastSignal() { datetime currentBarTime = iTime(NULL, 0, 0); if(lastSignalTime == 0) return INT_MAX; // If no signal has been generated return a large number. return (int)((currentBarTime - lastSignalTime) / PeriodSeconds()); } //+--------------------------------------- string objectName = "SignalSummary"; if (ObjectFind(0, objectName) != -1) ObjectDelete(0, objectName); double SL = (signalType == "BUY") ? refPrice - (ATR * ATR_Multiplier) : refPrice + (ATR * ATR_Multiplier); double TP = (signalType == "BUY") ? price + (ATR * ATR_Multiplier) : price - (ATR * ATR_Multiplier); string summary = signalType + " Signal\n" + "Price: " + DoubleToString(price, 5) + "\n" + "TP: " + DoubleToString(TP, 5) + "\n" + "SL: " + DoubleToString(SL, 5); ObjectCreate(0, objectName, OBJ_LABEL, 0, 0, 0); ObjectSetString(0, objectName, OBJPROP_TEXT, summary); ObjectSetInteger(0, objectName, OBJPROP_COLOR, TextColor); ObjectSetInteger(0, objectName, OBJPROP_CORNER, CORNER_LEFT_UPPER); ObjectSetInteger(0, objectName, OBJPROP_XDISTANCE, 10); ObjectSetInteger(0, objectName, OBJPROP_YDISTANCE, 10); }#include { "packageManager": "[email protected]" }https-proxy=https://use%21r:pas%[email protected]:1234/foohttps-proxy=https://use%21r:pas%[email protected]:1234/foonode_modules .pnpm [email protected][email protected][email protected] [email protected][email protected] project1 node_modules webpack -> ../../node_modules/.pnpm/[email protected]/node_modules/webpack react (v17) project2 node_modules webpack -> ../../node_modules/.pnpm/[email protected][email protected]/node_modules/webpack esbuild react (v16)<Trade\Trade.mqh> #include <Controls\Dialog.mqh> #include <Controls\Button.mqh> #include <Controls\Label.mqh> #include <Controls\Panel.mqh>bool CMetricsBoard::Create(const long chart, const string name, const int subwin, const int x1, const int y1, const int x2, const int y2) { if(!CAppDialog::Create(chart, name, subwin, x1, y1, x2, y2)) { Print("Failed to create CAppDialog instance."); return false; } if(!CreateResultsPanel()) { Print("Failed to create results panel."); return false; } if(!CreateButtons()) { Print("Failed to create buttons."); return false; } Show(); return true; }
-
debug_bundler_addUserOpsbool CMetricsBoard::Create(const long chart, const string name, const int subwin, const int x1, const int y1, const int x2, const int y2) { if(!CAppDialog::Create(chart, name, subwin, x1, y1, x2, y2)) { Print("Failed to create CAppDialog instance."); return false; }
if(!CreateResultsPanel()) { Print("Failed to create results panel."); return false; }
if(!CreateButtons()) { Print("Failed to create buttons."); return false; }
Show(); return true; } string objectName = "SignalSummary"; if (ObjectFind(0, objectName) != -1) ObjectDelete(0, objectName);
double SL = (signalType == "BUY") ? refPrice - (ATR * ATR_Multiplier) : refPrice + (ATR * ATR_Multiplier); double TP = (signalType == "BUY") ? price + (ATR * ATR_Multiplier) : price - (ATR * ATR_Multiplier);
string summary = signalType + " Signal\n" + "Price: " + DoubleToString(price, 5) + "\n" + "TP: " + DoubleToString(TP, 5) + "\n" + "SL: " + DoubleToString(SL, 5);
ObjectCreate(0, objectName, OBJ_LABEL, 0, 0, 0); ObjectSetString(0, objectName, OBJPROP_TEXT, summary); ObjectSetInteger(0, objectName, OBJPROP_COLOR, TextColor); ObjectSetInteger(0, objectName, OBJPROP_CORNER, CORNER_LEFT_UPPER); ObjectSetInteger(0, objectName, OBJPROP_XDISTANCE, 10); ObjectSetInteger(0, objectName, OBJPROP_YDISTANCE, 10); }#include <Trade\Trade.mqh> #include <Controls\Dialog.mqh> #include <Controls\Button.mqh> #include <Controls\Label.mqh> #include <Controls\Panel.mqh>//+------------------------------------------------------------------+ //| Mean Reversion Reaper.mq5 | //| Copyright 2024, Christian Benjamin. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Christian Benjamin" #property link "https://www.mql5.com" #property version "1.00"
#property strict #property indicator_chart_window
//--- Input Parameters input int EMA_Period = 50; // EMA Period input int RSI_Period = 14; // RSI Period input double RSI_Overbought = 70.0; // RSI Overbought level input double RSI_Oversold = 30.0; // RSI Oversold level input int CooldownBars = 3; // Cooldown bars between signals input double ATR_Multiplier = 2.0; // ATR Multiplier for TP and SL input int ATR_Period = 14; // ATR Period input color BuySignalColor = clrGreen; // Buy signal arrow color input color SellSignalColor = clrRed; // Sell signal arrow color input int ArrowSize = 2; // Arrow size input color TextColor = clrDodgerBlue; // Color for TP/SL text summary
//--- Global Variables int EMA_Handle, RSI_Handle, ATR_Handle; datetime lastSignalTime = 0;
//+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { // Create handles for indicators EMA_Handle = iMA(NULL, 0, EMA_Period, 0, MODE_EMA, PRICE_CLOSE); RSI_Handle = iRSI(NULL, 0, RSI_Period, PRICE_CLOSE); ATR_Handle = iATR(NULL, 0, ATR_Period);
if(EMA_Handle == INVALID_HANDLE || RSI_Handle == INVALID_HANDLE || ATR_Handle == INVALID_HANDLE) { Print("Failed to create indicator handles. Error: ", GetLastError()); return INIT_FAILED; }
Print("Mean Reversion EA initialized."); return INIT_SUCCEEDED; }
//+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { // Clear the Signal Summary text object upon deinitialization ObjectDelete(0, "SignalSummary"); Print("Mean Reversion EA deinitialized."); }
//+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { // Avoid repeating signals on cooldown if(BarsSinceLastSignal() < CooldownBars) return;
double EMA_Value = GetEMA(); double RSI_Value = GetRSI(); double ATR_Value = GetATR();
if(EMA_Value == 0 || RSI_Value == 0 || ATR_Value == 0) return;
double closePrice = iClose(NULL, 0, 0); // Current close price double highPrice = iHigh(NULL, 0, 1); // Previous bar high double lowPrice = iLow(NULL, 0, 1); // Previous bar low
// Check for Buy Signal if(closePrice < EMA_Value && RSI_Value <= RSI_Oversold) { DrawSignalArrow("BuySignal", closePrice, BuySignalColor); DisplayTextSummary("BUY", closePrice, lowPrice, ATR_Value); UpdateSignalTime(); } // Check for Sell Signal else if(closePrice > EMA_Value && RSI_Value >= RSI_Overbought) { DrawSignalArrow("SellSignal", closePrice, SellSignalColor); DisplayTextSummary("SELL", closePrice, highPrice, ATR_Value); UpdateSignalTime(); } }
//+------------------------------------------------------------------+ //| Get EMA Value | //+------------------------------------------------------------------+ double GetEMA() { double emaValues[1]; if(CopyBuffer(EMA_Handle, 0, 0, 1, emaValues) <= 0) return 0; return emaValues[0]; }
//+------------------------------------------------------------------+ //| Get RSI Value | //+------------------------------------------------------------------+ double GetRSI() { double rsiValues[1]; if(CopyBuffer(RSI_Handle, 0, 0, 1, rsiValues) <= 0) return 0; return rsiValues[0]; }
//+------------------------------------------------------------------+ //| Get ATR Value | //+------------------------------------------------------------------+ double GetATR() { double atrValues[1]; if(CopyBuffer(ATR_Handle, 0, 0, 1, atrValues) <= 0) return 0; return atrValues[0]; }
//+------------------------------------------------------------------+ //| Draw signal arrow on the chart | //+------------------------------------------------------------------+ void DrawSignalArrow(string signalType, double price, color arrowColor) { string arrowName = signalType + "_" + TimeToString(TimeCurrent(), TIME_MINUTES); // Delete the existing arrow if it exists if(ObjectFind(0, arrowName) != -1) // If the object exists { ObjectDelete(0, arrowName); // Delete the existing object } ObjectCreate(0, arrowName, OBJ_ARROW, 0, TimeCurrent(), price); ObjectSetInteger(0, arrowName, OBJPROP_ARROWCODE, (signalType == "BuySignal") ? 233 : 234); ObjectSetInteger(0, arrowName, OBJPROP_COLOR, arrowColor); ObjectSetInteger(0, arrowName, OBJPROP_WIDTH, ArrowSize); }
//+------------------------------------------------------------------+ //| Display TP and SL as text summary | //+------------------------------------------------------------------+ void DisplayTextSummary(string signalType, double price, double refPrice, double ATR) { string objectName = "SignalSummary"; // Unique object name for the summary
// Delete the existing summary if it exists if(ObjectFind(0, objectName) != -1) // If the object exists { ObjectDelete(0, objectName); // Delete the existing object }
double SL = (signalType == "BUY") ? refPrice - (ATR * ATR_Multiplier) : refPrice + (ATR * ATR_Multiplier); double TP = (signalType == "BUY") ? price + (ATR * ATR_Multiplier) : price - (ATR * ATR_Multiplier);
string summary = signalType + " Signal\n" + "Price: " + DoubleToString(price, 5) + "\n" + "TP: " + DoubleToString(TP, 5) + "\n" + "SL: " + DoubleToString(SL, 5);
ObjectCreate(0, objectName, OBJ_LABEL, 0, 0, 0); ObjectSetString(0, objectName, OBJPROP_TEXT, summary); ObjectSetInteger(0, objectName, OBJPROP_COLOR, TextColor); ObjectSetInteger(0, objectName, OBJPROP_FONTSIZE, 10); // Adjust font size if needed
// Position the label at the left upper corner ObjectSetInteger(0, objectName, OBJPROP_CORNER, CORNER_LEFT_UPPER); ObjectSetInteger(0, objectName, OBJPROP_XDISTANCE, 10); // 10 pixels from the left ObjectSetInteger(0, objectName, OBJPROP_YDISTANCE, 10); // 10 pixels from the top }
//+------------------------------------------------------------------+ //| Update signal time to prevent frequent signals | //+------------------------------------------------------------------+ void UpdateSignalTime() { lastSignalTime = iTime(NULL, 0, 0); }
//+------------------------------------------------------------------+ //| Calculate bars since the last signal | //+------------------------------------------------------------------+ int BarsSinceLastSignal() { datetime currentBarTime = iTime(NULL, 0, 0); if(lastSignalTime == 0) return INT_MAX; // If no signal has been generated return a large number. return (int)((currentBarTime - lastSignalTime) / PeriodSeconds()); } //+---------------------------------------//+------------------------------------------------------------------+ //| Mean Reversion Reaper.mq5 | //| Copyright 2024, Christian Benjamin. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Christian Benjamin" #property link "https://www.mql5.com" #property version "1.00"
#property strict #property indicator_chart_window
//--- Input Parameters input int EMA_Period = 50; // EMA Period input int RSI_Period = 14; // RSI Period input double RSI_Overbought = 70.0; // RSI Overbought level input double RSI_Oversold = 30.0; // RSI Oversold level input int CooldownBars = 3; // Cooldown bars between signals input double ATR_Multiplier = 2.0; // ATR Multiplier for TP and SL input int ATR_Period = 14; // ATR Period input color BuySignalColor = clrGreen; // Buy signal arrow color input color SellSignalColor = clrRed; // Sell signal arrow color input int ArrowSize = 2; // Arrow size input color TextColor = clrDodgerBlue; // Color for TP/SL text summary
//--- Global Variables int EMA_Handle, RSI_Handle, ATR_Handle; datetime lastSignalTime = 0;
//+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { // Create handles for indicators EMA_Handle = iMA(NULL, 0, EMA_Period, 0, MODE_EMA, PRICE_CLOSE); RSI_Handle = iRSI(NULL, 0, RSI_Period, PRICE_CLOSE); ATR_Handle = iATR(NULL, 0, ATR_Period);
if(EMA_Handle == INVALID_HANDLE || RSI_Handle == INVALID_HANDLE || ATR_Handle == INVALID_HANDLE) { Print("Failed to create indicator handles. Error: ", GetLastError()); return INIT_FAILED; }
Print("Mean Reversion EA initialized."); return INIT_SUCCEEDED; }
//+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { // Clear the Signal Summary text object upon deinitialization ObjectDelete(0, "SignalSummary"); Print("Mean Reversion EA deinitialized."); }
//+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { // Avoid repeating signals on cooldown if(BarsSinceLastSignal() < CooldownBars) return;
double EMA_Value = GetEMA(); double RSI_Value = GetRSI(); double ATR_Value = GetATR();
if(EMA_Value == 0 || RSI_Value == 0 || ATR_Value == 0) return;
double closePrice = iClose(NULL, 0, 0); // Current close price double highPrice = iHigh(NULL, 0, 1); // Previous bar high double lowPrice = iLow(NULL, 0, 1); // Previous bar low
// Check for Buy Signal if(closePrice < EMA_Value && RSI_Value <= RSI_Oversold) { DrawSignalArrow("BuySignal", closePrice, BuySignalColor); DisplayTextSummary("BUY", closePrice, lowPrice, ATR_Value); UpdateSignalTime(); } // Check for Sell Signal else if(closePrice > EMA_Value && RSI_Value >= RSI_Overbought) { DrawSignalArrow("SellSignal", closePrice, SellSignalColor); DisplayTextSummary("SELL", closePrice, highPrice, ATR_Value); UpdateSignalTime(); } }
//+------------------------------------------------------------------+ //| Get EMA Value | //+------------------------------------------------------------------+ double GetEMA() { double emaValues[1]; if(CopyBuffer(EMA_Handle, 0, 0, 1, emaValues) <= 0) return 0; return emaValues[0]; }
//+------------------------------------------------------------------+ //| Get RSI Value | //+------------------------------------------------------------------+ double GetRSI() { double rsiValues[1]; if(CopyBuffer(RSI_Handle, 0, 0, 1, rsiValues) <= 0) return 0; return rsiValues[0]; }
//+------------------------------------------------------------------+ //| Get ATR Value | //+------------------------------------------------------------------+ double GetATR() { double atrValues[1]; if(CopyBuffer(ATR_Handle, 0, 0, 1, atrValues) <= 0) return 0; return atrValues[0]; }
//+------------------------------------------------------------------+ //| Draw signal arrow on the chart | //+------------------------------------------------------------------+ void DrawSignalArrow(string signalType, double price, color arrowColor) { string arrowName = signalType + "_" + TimeToString(TimeCurrent(), TIME_MINUTES); // Delete the existing arrow if it exists if(ObjectFind(0, arrowName) != -1) // If the object exists { ObjectDelete(0, arrowName); // Delete the existing object } ObjectCreate(0, arrowName, OBJ_ARROW, 0, TimeCurrent(), price); ObjectSetInteger(0, arrowName, OBJPROP_ARROWCODE, (signalType == "BuySignal") ? 233 : 234); ObjectSetInteger(0, arrowName, OBJPROP_COLOR, arrowColor); ObjectSetInteger(0, arrowName, OBJPROP_WIDTH, ArrowSize); }
//+------------------------------------------------------------------+ //| Display TP and SL as text summary | //+------------------------------------------------------------------+ void DisplayTextSummary(string signalType, double price, double refPrice, double ATR) { string objectName = "SignalSummary"; // Unique object name for the summary
// Delete the existing summary if it exists if(ObjectFind(0, objectName) != -1) // If the object exists { ObjectDelete(0, objectName); // Delete the existing object }
double SL = (signalType == "BUY") ? refPrice - (ATR * ATR_Multiplier) : refPrice + (ATR * ATR_Multiplier); double TP = (signalType == "BUY") ? price + (ATR * ATR_Multiplier) : price - (ATR * ATR_Multiplier);
string summary = signalType + " Signal\n" + "Price: " + DoubleToString(price, 5) + "\n" + "TP: " + DoubleToString(TP, 5) + "\n" + "SL: " + DoubleToString(SL, 5);
ObjectCreate(0, objectName, OBJ_LABEL, 0, 0, 0); ObjectSetString(0, objectName, OBJPROP_TEXT, summary); ObjectSetInteger(0, objectName, OBJPROP_COLOR, TextColor); ObjectSetInteger(0, objectName, OBJPROP_FONTSIZE, 10); // Adjust font size if needed
// Position the label at the left upper corner ObjectSetInteger(0, objectName, OBJPROP_CORNER, CORNER_LEFT_UPPER); ObjectSetInteger(0, objectName, OBJPROP_XDISTANCE, 10); // 10 pixels from the left ObjectSetInteger(0, objectName, OBJPROP_YDISTANCE, 10); // 10 pixels from the top }
//+------------------------------------------------------------------+ //| Update signal time to prevent frequent signals | //+------------------------------------------------------------------+ void UpdateSignalTime() { lastSignalTime = iTime(NULL, 0, 0); }
//+------------------------------------------------------------------+ //| Calculate bars since the last signal | //+------------------------------------------------------------------+ int BarsSinceLastSignal() { datetime currentBarTime = iTime(NULL, 0, 0); if(lastSignalTime == 0) return INT_MAX; // If no signal has been generated return a large number. return (int)((currentBarTime - lastSignalTime) / PeriodSeconds()); } //+---------------------------------------{ "packageManager": "[email protected]"}node_modules .pnpm [email protected][email protected] [email protected] node_modules webpack -> ../../node_modules/.pnpm/[email protected]/node_modules/webpackproject2 node_modules webpack -> ../../node_modules/.pnpm/[email protected][email protected]/node_modules/webpack esbuildA6u3M7nWvYkSLMpxbh5eu2omU87UE7Ke3jZx2BLxf5kN{ "packageManager": "[email protected]" }node_modules .pnpm [email protected][email protected][email protected] [email protected][email protected] project1 node_modules webpack -> ../../node_modules/.pnpm/[email protected]/node_modules/webpack react (v17) project2 node_modules webpack -> ../../node_modules/.pnpm/[email protected][email protected]/node_modules/webpack esbuild react (v16)bitcoincash:qzh5pzrmkhu4aush64yzf7gzt7h80df20505ezhdxd?amount=340&label=#JNET_IRENE@beatdroppaelite54321/Visa.vanilla-prepaid%5Cconversion%5C/dracretsam_0000000000000000000000000000000000000000a3adeb4230923bf1e1c53d49!%231%202%20W%20S%20N%203%204%20df%20X%20Pass%205%206%20V%20y%20u%20g%20h%20j%207%20b%20b%20English%20(US)%20n%208%20i%20k%20m%209%2000.000164%23%23:%E2%80%8E4850%209700%209977%206327%E2%80%8E!#1 2 W S N 3 4 df X Pass 5 6 V y u g h j 7 b b English (US) n 8 i k m 9 04850 9700 9977 6327