Paramon_Scalp
Download scriptThis tool is designed to help traders identify specific price boundaries based on time-sensitive market behavior. Instead of relying on every single price fluctuation, it focuses on identifying "High" and "Low" benchmarks during predefined periods of the trading day.
Core Logic Overview
1. Time-Based Filtering The script allows you to define two specific windows of time (for example, a morning session and an afternoon session). The tool monitors the market specifically during these hours. Its primary purpose is to isolate "active" trading zones from "quiet" periods to ensure the data it collects is relevant to your specific strategy.
2. High and Low Capture At the very start of each defined time window, the script looks backward at the price action leading up to that moment. It identifies two critical values:
- The highest price reached during that period.
- The lowest price reached during that period.
3. Dynamic Boundary Drawing During the active trading windows, the script projects these high and low values onto your chart as visual lines. These lines act as a "channel" or boundary. By visualizing these levels, you can see where the significant price limits were established for that specific session, helping you identify potential areas of support (the floor) and resistance (the ceiling).
4. Real-Time Volatility Monitoring The tool performs a continuous calculation of the "Channel Width"—the distance between the identified High and Low prices. It compares this width against a user-defined threshold:
- If the channel is wide enough: It signals that the market has moved significantly, providing you with the specific Buy and Sell price levels.
- If the channel is too narrow: It indicates that there hasn't been enough price movement yet to establish a reliable trading zone, and it informs you that the market is not yet ready for a trade based on your criteria.
Summary for the User
Essentially, this script automates the task of finding the "ceiling" and "floor" of the market during specific times of the day. It filters out the noise, highlights the boundaries clearly on your screen, and provides a real-time status update on whether the price movement is large enough to be considered a valid trading opportunity.
//+------------------------------------------------------------------+
//| MaksiGen_KaHaJI_CkaJIneP.mq4 |
//| MaksiGen |
//| http:// |
//+------------------------------------------------------------------+
#property copyright "MaksiGen"
#property link "http://"
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Aqua
#property indicator_color2 Violet
#property indicator_color3 DarkTurquoise
#property indicator_color4 Magenta
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
extern string Time_Start_1="08.15";
extern string Time_End_1="11.30";
extern string Time_Start_2="14.00";
extern string Time_End_2="17.30";
extern int MuH_IIIuPuHa_KaHaJIa=25;
double val_1[],val_2[],val_3[],val_4[],HighKaHaJI,LowKaHaJI;
string TextHour_Start_1,TextMinute_Start_1,TextHour_End_1,TextMinute_End_1;
string TextHour_Start_2,TextMinute_Start_2,TextHour_End_2,TextMinute_End_2;
string BbIBog;
int Hour_Start_1,Minute_Start_1,Hour_End_1,Minute_End_1;
int Hour_Start_2,Minute_Start_2,Hour_End_2,Minute_End_2;
int IIIuPuHa_KaHaJIa;
bool on_off_trade;
//datetime DateTime_Start_1,DateTime_Start_2,DateTime_End_1,DateTime_End_2;
int init()
{
//---- indicators
IndicatorBuffers(4);
SetIndexStyle(0,DRAW_LINE,1,3);
SetIndexStyle(1,DRAW_LINE,1,3);
SetIndexStyle(2,DRAW_LINE);
SetIndexStyle(3,DRAW_LINE);
SetIndexBuffer(0,val_1);
SetIndexBuffer(1,val_2);
SetIndexBuffer(2,val_3);
SetIndexBuffer(3,val_4);
//---- Time
TextHour_Start_1=StringSubstr(Time_Start_1,0,2);Hour_Start_1=StrToInteger(TextHour_Start_1);
TextMinute_Start_1=StringSubstr(Time_Start_1,3,2);Minute_Start_1=StrToInteger(TextMinute_Start_1);
TextHour_End_1=StringSubstr(Time_End_1,0,2);Hour_End_1=StrToInteger(TextHour_End_1);
TextMinute_End_1=StringSubstr(Time_End_1,3,2);Minute_End_1=StrToInteger(TextMinute_End_1);
TextHour_Start_2=StringSubstr(Time_Start_2,0,2);Hour_Start_2=StrToInteger(TextHour_Start_2);
TextMinute_Start_2=StringSubstr(Time_Start_2,3,2);Minute_Start_2=StrToInteger(TextMinute_Start_2);
TextHour_End_2=StringSubstr(Time_End_2,0,2);Hour_End_2=StrToInteger(TextHour_End_2);
TextMinute_End_2=StringSubstr(Time_End_2,3,2);Minute_End_2=StrToInteger(TextMinute_End_2);
// ïîäãîí âðåìåíè "MSK" ïîä âðåìÿ ñåðâåðà Àëüïàðè
//Hour_Start_1=Hour_Start_1-2;Hour_End_1=Hour_End_1-2;
//Hour_Start_2=Hour_Start_2-2;Hour_End_1=Hour_End_2-2;
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int shift,i,ii;
int Counted_Bars=IndicatorCounted();
if (Period()>30)
{
if (Minute_Start_1!=0) {Minute_Start_1=0;}
if (Minute_End_1!=0) {Hour_End_1++;Minute_End_1=0;}
if (Minute_Start_2!=0) {Minute_Start_2=0;}
if (Minute_End_2!=0) {Hour_End_2++;Minute_End_2=0;}
}
//----
if (Counted_Bars>=Bars) Counted_Bars=Bars;
if(Counted_Bars<0) return(-1);//---- ïðîâåðêà íà âîçìîæíûå îøèáêè
for (shift=Counted_Bars+10;shift>0;shift--)
{
on_off_trade=false;//-íàõîäèì âðåìÿ òîðãîâëè
if (TimeHour(Time[shift])>Hour_Start_1 && TimeHour(Time[shift])<Hour_End_1) on_off_trade=true;
if (TimeHour(Time[shift])==Hour_Start_1 && TimeMinute(Time[shift])>=Minute_Start_1) on_off_trade=true;
if (TimeHour(Time[shift])==Hour_End_1 && TimeMinute(Time[shift])<=Minute_End_1) on_off_trade=true;
if (TimeHour(Time[shift])>Hour_Start_2 && TimeHour(Time[shift])<Hour_End_2) on_off_trade=true;
if (TimeHour(Time[shift])==Hour_Start_2 && TimeMinute(Time[shift])>=Minute_Start_2) on_off_trade=true;
if (TimeHour(Time[shift])==Hour_End_2 && TimeMinute(Time[shift])<=Minute_End_2) on_off_trade=true;
//---
if (TimeHour(Time[shift])==Hour_Start_1 && TimeMinute(Time[shift])==Minute_Start_1)
{
HighKaHaJI=0;
LowKaHaJI=10000;
for (i=shift+MathRound((Hour_Start_1*60+Minute_Start_1)/Period());i>shift;i--)
{
if (High[i]>HighKaHaJI) HighKaHaJI=High[i];
if (Low[i]<LowKaHaJI) LowKaHaJI=Low[i];
}
}
//---
if (on_off_trade)
{
val_1[shift]=HighKaHaJI;
val_3[shift]=HighKaHaJI+10*Point;
val_2[shift]=LowKaHaJI;
val_4[shift]=LowKaHaJI-10*Point;
}
IIIuPuHa_KaHaJIa=(HighKaHaJI-LowKaHaJI)/Point;
}
if (IIIuPuHa_KaHaJIa>MuH_IIIuPuHa_KaHaJIa)
{BbIBog=", Bay îò "+DoubleToStr(HighKaHaJI,4)+", Sell îò "+DoubleToStr(LowKaHaJI,4);}
else {BbIBog=", íåò òîðãîâëè";}
Comment("\n","\n","Ðàáî÷åå âðåìÿ ñåðâåðà: ñ ",TextHour_Start_1,":",TextMinute_Start_1," äî ",TextHour_End_1,":",TextMinute_End_1,
" è ñ ",TextHour_Start_2,":",TextMinute_Start_2," äî ",TextHour_End_2,":",TextMinute_End_2,
"\n","Øèðèíà êàíàëà: ",IIIuPuHa_KaHaJIa,BbIBog);
//----
return(0);
}
//+------------------------------------------------------------------+
Comments