a_Nina_v1
Download scriptThis tool is designed to provide visual signals on your trading charts by analyzing historical price movements and identifying specific market patterns. It functions as a secondary overlay that helps traders pinpoint potential entry levels for both buying and selling opportunities.
Core Functionality
The script works by scanning historical price data over a user-defined period (defaulting to 30-minute intervals) to detect significant market shifts. Instead of just showing raw data, it filters through the price action to identify specific "triggers." When these triggers occur, the tool places distinct visual markers on your chart:
- Buy Signals: Represented by blue icons located slightly below the recent price candles.
- Sell Signals: Represented by red icons located slightly above the recent price candles.
How it Processes Data
To ensure the signals are accurate and relevant to the timeframe you are viewing, the logic employs several key processing steps:
- Data Synchronization: The script looks back at a significant amount of historical data (up to 1,000 bars) to understand the trend context before identifying current signals.
- Pattern Recognition: It utilizes an underlying mathematical model (referred to as "aNina") to evaluate the relationship between price highs and lows. This helps the tool distinguish between standard market "noise" and actual structural changes in price.
- Visual Positioning: To keep the chart clean and readable, the script automatically offsets the markers. Buy signals are placed just below the low of a candle, and sell signals are placed just above the high, ensuring they do not overlap with the actual price bars.
- Dynamic Adjustment: The tool is customizable, allowing you to adjust sensitivity parameters (like the Period WATR and Kwatr values) to better align with your specific trading style, whether you prefer capturing fast moves or more stable, long-term trends.
Summary for the User
In simple terms, this script acts as a "scout." It scans the market history based on your preferred timeframes and settings, calculates where the price is likely to shift, and marks those areas with blue and red arrows. This allows you to see potential trading zones at a glance without having to manually interpret complex price fluctuations.
/*-----------------------------+
| |
| Shared by www.Aptrafx.com |
| |
+------------------------------*/
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
//---- input parameters
extern int PeriodWATR=10;
extern double Kwatr=1.0000;
extern int HighLow=0;
extern int cbars = 1000;
extern int from = 0;
extern int period = PERIOD_M30;
//---- indicator buffers
double LineBuyBuffer[];
double LineSellBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init(){
string short_name;
//---- indicator line
SetIndexStyle(0,DRAW_ARROW,STYLE_SOLID,2);
SetIndexStyle(1,DRAW_ARROW,STYLE_SOLID,2);
SetIndexEmptyValue(0,0);
SetIndexArrow(0,233);
SetIndexEmptyValue(1,0);
SetIndexArrow(1,234);
SetIndexBuffer(0,LineBuyBuffer);
SetIndexBuffer(1,LineSellBuffer);
//---- name for DataWindow and indicator subwindow label
short_name="NinaX";
IndicatorShortName(short_name);
//----
return(0);
}
int start(){
int i,b,f = iBarShift(NULL,period,Time[from]),l = 0;
ArrayInitialize(LineBuyBuffer,0);
ArrayInitialize(LineSellBuffer,0);
for(i=cbars-1;i>=from;i--){
b = iBarShift(NULL,period,Time[i]);
if(l==b){
LineBuyBuffer[i] = 0;
LineSellBuffer[i] = 0;
}
else{
l = b;
LineBuyBuffer[i] = iCustom(NULL,period,"aNina",PeriodWATR,Kwatr,HighLow,cbars,f,2,b);
if(LineBuyBuffer[i]!=0) LineBuyBuffer[i] = Low[i]-10*Point;
LineSellBuffer[i] = iCustom(NULL,period,"aNina",PeriodWATR,Kwatr,HighLow,cbars,f,3,b);
if(LineSellBuffer[i]!=0) LineSellBuffer[i] = High[i]+10*Point;
}
}
return(0);
}
Comments