MTF-Dinapoli_Target

Download script
MTF-Dinapoli_Target

This tool is designed to enhance your trading visual by providing advanced price targets across different timeframes simultaneously. It functions as a specialized overlay that allows you to see data from a higher timeframe (a larger "big picture" view) directly on your current smaller timeframe chart without having to constantly switch back and forth between screens.

Core Functionality

Multi-Timeframe Synchronization The primary purpose of this script is to bridge the gap between different time periods. It retrieves specific target data from a secondary indicator called "DinapoliTargets." By doing this, it allows you to monitor significant price levels that occur on a larger timeframe (like a 1-hour chart) while you are actively trading on a smaller, more detailed timeframe (like a 15-minute chart).

Dynamic Alignment Logic The script includes an intelligent "shift" logic. Instead of simply plotting the data linearly, it calculates exactly where the data from the larger timeframe aligns with the current candles on your screen. It performs a search through historical time data to ensure that the targets displayed are synchronized correctly with the current market progression, ensuring that the visual information remains accurate regardless of which specific candle you are viewing.

Automated Validation To ensure the tool functions correctly and provides reliable data, the script includes a built-in safety check. It verifies that the timeframe you are currently using is not larger than the target period you have selected. If the settings are mismatched in a way that would make the data confusing or inaccurate, the system will notify you immediately to adjust the parameters.

Key Benefits for the User

  • Seamless Analysis: You can identify major price targets without navigating away from your active trade screen.
  • Visual Clarity: The script plots these targets as distinct visual markers (arrows), making it easy to see upcoming levels at a glance.
  • Contextual Awareness: It provides "big picture" context to your day-to-day trading, helping you stay aware of larger market trends while focusing on short-term entries.
Miscellaneous
Implements a curve of type %1It issuies visual alerts to the screen
8 Views
0 Downloads
0 Favorites
MTF-Dinapoli_Target
//+------------------------------------------------------------------+ 
//|                                          MTF-Dinapoli_Target.mq4 | 
//+------------------------------------------------------------------+
//MTF == Muliple Time Frame 
#property copyright "klot" //Basic code
#property link      "klot@mail.ru" 

#property indicator_chart_window 
#property indicator_buffers 1 
#property indicator_color1 Yellow 
//---- input parameters 
extern int UpperPeriod=15; 
//---- buffers 
double ExtMapBuffer1[]; 
datetime daytimes[]; 
//+------------------------------------------------------------------+ 
//| Custom indicator initialization function                         | 
//+------------------------------------------------------------------+ 
int init() 
  { 
//---- indicators 
   SetIndexStyle(0,DRAW_ARROW); 
   SetIndexArrow(0,159); 
   SetIndexBuffer(0,ExtMapBuffer1); 
   SetIndexEmptyValue(0,0.0); 
//---- 
   if (Period()>UpperPeriod) { Alert("UpperPeriod<TimeFrame!!change UpperPeriod on Indikator(MTF-Dinapoli_Target) please!!!", UpperPeriod); return(0); } 
   ArrayCopySeries(daytimes,MODE_TIME,Symbol(),UpperPeriod); 
   return(0); 
  } 
//+------------------------------------------------------------------+ 
//| Custor indicator deinitialization function                       | 
//+------------------------------------------------------------------+ 
int deinit() 
  { 
//---- 
    
//---- 
   return(0); 
  } 
//+------------------------------------------------------------------+ 
//| Custom indicator iteration function                              | 
//+------------------------------------------------------------------+ 
int start() 
  { 
   int    limit, bigshift; 
   int    counted_bars=IndicatorCounted(); 
//---- 
   if (counted_bars<0) return(-1); 
    
   if (counted_bars>0) counted_bars--; 
    
   limit=Bars-counted_bars; 
    
   for (int i=0; i<limit; i++) 
   { 
   if(Time[i]>=daytimes[0]) bigshift=0; 
   else 
     { 
      bigshift = ArrayBsearch(daytimes,Time[i-1],WHOLE_ARRAY,0,MODE_DESCEND); 
      if(Period()<=UpperPeriod) bigshift++; 
     } 
  ExtMapBuffer1[i]=iCustom(NULL,UpperPeriod,"DinapoliTargets",0,bigshift); 
   } 
//---- 
   return(0); 
  } 
//+------------------------------------------------------------------+ 

Comments