add order block finder and add some other tools and also test them ...
This commit is contained in:
@@ -119,11 +119,11 @@ void OnTick()
|
||||
|
||||
//
|
||||
// Find Morning Star Pattern ...
|
||||
FindMorningStar();
|
||||
// FindMorningStar();
|
||||
|
||||
//
|
||||
// Find Evening Star Pattern ...
|
||||
FindEveningStar();
|
||||
// FindEveningStar();
|
||||
|
||||
//
|
||||
// Find Swing High Pattern ...
|
||||
@@ -156,6 +156,24 @@ void OnTick()
|
||||
//
|
||||
// Find Bearish Trend ...
|
||||
// FindBearishTrend();
|
||||
|
||||
//
|
||||
// Find Bullish Order Block ...
|
||||
// FindBullishOrderBlock();
|
||||
|
||||
//
|
||||
// Find Bearish Order Block ...
|
||||
// FindBearishOrderBlock();
|
||||
|
||||
//
|
||||
// Find Sharp Going Up Price Action ...
|
||||
// FindSharpBullish();
|
||||
|
||||
//
|
||||
// Find Sharp Going Down Price Action ...
|
||||
// FindSharpBearish();
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
//
|
||||
@@ -177,6 +195,64 @@ bool ValidateInputs()
|
||||
//
|
||||
// Custom Testing Functions ...
|
||||
|
||||
//
|
||||
// Find Sharp Going Up Price Action ...
|
||||
void FindSharpBullish()
|
||||
{
|
||||
//
|
||||
XOHCL cBar;
|
||||
bool isInited = cBar.Init(
|
||||
_Symbol,
|
||||
_Period,
|
||||
1 //
|
||||
);
|
||||
if (!isInited)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
if (!cBar.IsSharpBullish())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
eaBarTracker.Waits();
|
||||
|
||||
//
|
||||
Print("Detect Sharp Bullish Price Action ...");
|
||||
}
|
||||
|
||||
//
|
||||
// Find Sharp Going Down Price Action ...
|
||||
void FindSharpBearish()
|
||||
{
|
||||
//
|
||||
XOHCL cBar;
|
||||
bool isInited = cBar.Init(
|
||||
_Symbol,
|
||||
_Period,
|
||||
1 //
|
||||
);
|
||||
if (!isInited)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
if (!cBar.IsSharpBearish())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
eaBarTracker.Waits();
|
||||
|
||||
//
|
||||
Print("Detect Sharp Bearish Price Action ...");
|
||||
}
|
||||
|
||||
//
|
||||
// Find Doji Pattern ...
|
||||
void FindDoji()
|
||||
@@ -1072,4 +1148,134 @@ void FindBearishTrend()
|
||||
Print("Bearish Trend Detected ...");
|
||||
}
|
||||
|
||||
//
|
||||
// Find Bullish Order Block ...
|
||||
void FindBullishOrderBlock() {
|
||||
//
|
||||
XOHCL cBar;
|
||||
bool isInited = cBar.Init(
|
||||
_Symbol,
|
||||
_Period,
|
||||
1 //
|
||||
);
|
||||
if (!isInited)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL obBar;
|
||||
bool hasOB = cBar.HasBullishOrderBlock(
|
||||
obBar //
|
||||
);
|
||||
if (!hasOB) {
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
eaBarTracker.Waits();
|
||||
|
||||
//
|
||||
DrawTrendLine(
|
||||
ChartID(),
|
||||
"BULLOB-H-" + ToString((int) obBar.time),
|
||||
0,
|
||||
obBar.time,
|
||||
obBar.high,
|
||||
cBar.time,
|
||||
obBar.high,
|
||||
clrAqua,
|
||||
STYLE_SOLID,
|
||||
2,
|
||||
false,
|
||||
false,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
DrawTrendLine(
|
||||
ChartID(),
|
||||
"BULLOB-L-" + ToString((int) obBar.time),
|
||||
0,
|
||||
obBar.time,
|
||||
obBar.low,
|
||||
cBar.time,
|
||||
obBar.low,
|
||||
clrAqua,
|
||||
STYLE_SOLID,
|
||||
2,
|
||||
false,
|
||||
false,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
Print("Detect new Bullish Order Block ...");
|
||||
}
|
||||
|
||||
//
|
||||
// Find Bearish Order Block ...
|
||||
void FindBearishOrderBlock() {
|
||||
//
|
||||
XOHCL cBar;
|
||||
bool isInited = cBar.Init(
|
||||
_Symbol,
|
||||
_Period,
|
||||
1 //
|
||||
);
|
||||
if (!isInited)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL obBar;
|
||||
bool hasOB = cBar.HasBearishOrderBlock(
|
||||
obBar //
|
||||
);
|
||||
if (!hasOB) {
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
eaBarTracker.Waits();
|
||||
|
||||
//
|
||||
DrawTrendLine(
|
||||
ChartID(),
|
||||
"BEAROB-H-" + ToString((int) obBar.time),
|
||||
0,
|
||||
obBar.time,
|
||||
obBar.high,
|
||||
cBar.time,
|
||||
obBar.high,
|
||||
clrMagenta,
|
||||
STYLE_SOLID,
|
||||
2,
|
||||
false,
|
||||
false,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
DrawTrendLine(
|
||||
ChartID(),
|
||||
"BEAROB-L-" + ToString((int) obBar.time),
|
||||
0,
|
||||
obBar.time,
|
||||
obBar.low,
|
||||
cBar.time,
|
||||
obBar.low,
|
||||
clrMagenta,
|
||||
STYLE_SOLID,
|
||||
2,
|
||||
false,
|
||||
false,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
Print("Detect new Bearish Order Block ...");
|
||||
}
|
||||
|
||||
//
|
||||
Reference in New Issue
Block a user