DT-RFTL(23SEP05)

Download script
Author: klot
DT-RFTL(23SEP05)

This tool is designed to enhance your trading charts by synchronizing data from a higher timeframe into your current view. Essentially, it acts as a "bridge," allowing you to see specific technical analysis signals from a larger perspective without having to constantly switch between different timeframes manually.

How the Logic Works

1. Timeframe Synchronization The script is configured with a specific "Gross Period" (the target timeframe). It looks at this larger window of time to gather high-level market data. Because some technical signals are only meaningful when viewed over a long duration, this tool ensures that the information you see on your small-scale chart remains consistent with the behavior of the larger market trends.

2. Intelligent Data Mapping Instead of simply displaying a standard indicator on your current screen—which might lead to "noisy" or premature signals—the script performs a calculation to find the exact corresponding moment in the larger timeframe. It scans through the history of the target period and identifies where the current price point aligns with that broader data.

3. Signal Retrieval Once the script finds the correct alignment, it "reaches out" to an external technical indicator (named RFTL) on that larger timeframe. It then pulls the specific signal from that period and places it onto your current chart as a visual marker (an arrow).

Key Features for the User

  • Visual Guidance: The primary output is represented by magenta arrows. These markers indicate where the higher-timeframe logic suggests an entry or trend change occurs.
  • Contextual Awareness: By using this script, you are essentially trading with the "big picture" in mind. It filters out minor fluctuations on your current chart that might not matter on a larger scale, helping to identify more significant market movements.
  • Automatic Adjustment: The script handles the complex math of aligning different time scales automatically. It ensures that even if you are looking at a very fast-moving chart, the signals you see remain anchored to the slower, more stable data of your chosen Gross Period.

Important Usage Note

The tool includes a safety check: it is designed to work only on charts that are faster than (or equal to) the specified Gross Period. If you attempt to run it on a timeframe that is larger than the target period, the system will notify you, as the logic requires a "top-down" approach to display the information correctly.

Miscellaneous
Implements a curve of type %1It issuies visual alerts to the screen
16 Views
0 Downloads
0 Favorites
DT-RFTL(23SEP05)
//+------------------------------------------------------------------+ 
//|                                                       DT-FATL.mq4 | 
//+------------------------------------------------------------------+ 
#property copyright "klot" 
#property link      "klot@mail.ru" 

#property indicator_chart_window 
#property indicator_buffers 1 
#property indicator_color1 Magenta 

extern int GrossPeriod=240; // Ñòàðøèé ïåðèîä â ìèíóòàõ 

datetime daytimes[]; 
//---- buffers 
double ExtMapBuffer1[]; 
//+------------------------------------------------------------------+ 
//| Custom indicator initialization function                         | 
//+------------------------------------------------------------------+ 
int init() 
  { 
//---- indicators 
   SetIndexStyle(0,DRAW_ARROW); 
   SetIndexArrow(0,159); 
   SetIndexBuffer(0,ExtMapBuffer1); 
   SetIndexEmptyValue(0,0.0); 
   if (Period()>GrossPeriod) { Alert("DT-RSTL: Òåêóùèé òàéìôðåéì äîëæåí áûòü ìåíüøå ÷åì ", GrossPeriod); return(0); } 
//---- 


// Âñå Time[] ñåðèè âðåìåíè îòñîðòèðîâàíî â íàïðàâëåíèè óáûâàíèÿ 
ArrayCopySeries(daytimes,MODE_TIME,Symbol(),GrossPeriod); 

   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()<=GrossPeriod) bigshift++; 
     } 
  ExtMapBuffer1[i]=iCustom(NULL,GrossPeriod,"RFTL",0,bigshift); 
   } 
//---- 
   return(0); 
  } 
//+------------------------------------------------------------------+ 

Comments