Author: Yuriy Tokman
TikTak

This tool functions as a real-time price movement monitor designed to provide instant notifications whenever the market price moves by a specific amount. Instead of focusing on complex trends or patterns, it acts as a "trigger" system that tracks the raw change in value between consecutive price updates.

How the Logic Works

The script constantly observes the current market price and compares it to the price recorded immediately before the last update. It operates through the following logical steps:

  • Price Normalization: The tool converts the raw exchange price into a standard unit (based on "pips," a common measurement in trading) to ensure that the movements being measured are consistent and meaningful.
  • Change Detection: Every time the market price updates, the script calculates the mathematical difference between the new price and the previous one.
  • Movement Filtering: It ignores minor fluctuations or "noise" by only reacting when the price moves beyond a user-defined threshold. You can set this sensitivity manually to decide how much of a move is significant enough to trigger a notification.
  • Directional Alerts: The logic distinguishes between upward and downward movements:
    • If the price drops significantly (meeting or exceeding your negative threshold), it triggers a specific alert indicating a decrease in value.
    • If the price rises significantly (meeting or exceeding your positive threshold), it triggers an alert indicating an increase in value.
  • Continuous Tracking: After each calculation, the script "saves" the current price as the new reference point. This allows it to continually monitor the market step-by-step, ensuring that every individual movement is captured relative to the tick immediately preceding it.

In essence, this tool serves as a vigilant observer that stays silent during minor market vibrations but alerts you the moment the price "ticks" over your desired limit in either direction.

Miscellaneous
It issuies visual alerts to the screen
8 Views
0 Downloads
0 Favorites
TikTak
//+------------------------------------------------------------------+
//|                                                      TikTak.mq4 |
//|                                                     Yuriy Tokman |
//|                                            yuriytokman@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Yuriy Tokman"
#property link      "yuriytokman@gmail.com"

#property indicator_chart_window
int price_prev,s;
extern int pips=1;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
//----
int price=MathRound(Bid/Point),r;
   if (price_prev==price) return;
   r=price-price_prev;
   if(r<=-pips)
   {
    Alert("Âíèç ",r,"ïóíêòîâ"," Öåíà ",Bid);
   }
   if(r>=pips)
   {
    Alert("Ââåðõ ",r," Öåíà ",Ask);
   }
   
   price_prev=price;
   
//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments