Can help me? (need advice on proper Blynk code format)

hi i would like to ask some question this group, and your advice,how to use the button from BLYNK connect to ESPRESSO which is want to ON/OFF function using manual remotely apps BLYNK
EXAMPLE :
the magnetic switch open (button BLYNK ON) then alarm trigger and get the notification, when the magnetic switch close (BUTTON OFF) the alarm and notification not function.
this is my coding hopefully can help me.
onegaishimasu

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = " ";
char ssid[] = " ";
char pass[] = " ";
const int ALARMPIN = 15;
const int MAGNETICSWITCHPIN = 12;
void setup() {
pinMode(ALARMPIN, OUTPUT);
pinMode(MAGNETICSWITCHPIN, INPUT);
digitalWrite(ALARMPIN, LOW);
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
}
void loop() {
Blynk.run();
bool switchState = digitalRead(MAGNETICSWITCHPIN);
if (!switchState) {
Blynk.notify(”alert intruders at your house“);
digitalWrite(ALARMPIN, HIGH);
delay(5000);
Serial.println(”HIGH“);
}
else {
digitalWrite(ALARM_PIN, LOW);
Serial.println("LOW");
}
}

Welcome to Blynk.

First off please format your code so we can all see it clearly (EDIT - after waiting 12+ hours, I have correctly formatted your code - please look at how it is done for any future postings).

Second, your title should be something clear and specific to your issue… “help me” is NOT a good title :wink: I adjusted it a bit, but still unsure of your exact question.

Next… what exactly is the issue?

Also, please take the time to look into the Getting Started, Documents and the Sketch Builder (Links are also all at the top of this page) as you will better learn how Blynk works by example and experimentation.