last ...
This commit is contained in:
+32
-216
@@ -814,11 +814,9 @@ void FindSupport()
|
||||
|
||||
//
|
||||
datetime at = NULL;
|
||||
double support = 0;
|
||||
XOHCL support;
|
||||
bool hasSupport = cBar.HasSupport(
|
||||
support,
|
||||
at //
|
||||
);
|
||||
support);
|
||||
if (!hasSupport)
|
||||
{
|
||||
return;
|
||||
@@ -828,21 +826,7 @@ void FindSupport()
|
||||
eaBarTracker.Waits();
|
||||
|
||||
//
|
||||
DrawTrendLine(
|
||||
ChartID(),
|
||||
"Support-" + ToString((int)at),
|
||||
0,
|
||||
at,
|
||||
support,
|
||||
TimeCurrent(),
|
||||
support,
|
||||
clrAqua,
|
||||
STYLE_DOT,
|
||||
1,
|
||||
false,
|
||||
false,
|
||||
true //
|
||||
);
|
||||
DrawSupport(support, ChartID());
|
||||
|
||||
//
|
||||
Print("Support Detected ...");
|
||||
@@ -866,11 +850,9 @@ void FindResistance()
|
||||
|
||||
//
|
||||
datetime at = NULL;
|
||||
double resistance = 0;
|
||||
XOHCL resistance;
|
||||
bool hasResistance = cBar.HasResistance(
|
||||
resistance,
|
||||
at //
|
||||
);
|
||||
resistance);
|
||||
if (!hasResistance)
|
||||
{
|
||||
return;
|
||||
@@ -880,21 +862,7 @@ void FindResistance()
|
||||
eaBarTracker.Waits();
|
||||
|
||||
//
|
||||
DrawTrendLine(
|
||||
ChartID(),
|
||||
"Resistance-" + ToString((int)at),
|
||||
0,
|
||||
at,
|
||||
resistance,
|
||||
TimeCurrent(),
|
||||
resistance,
|
||||
clrMagenta,
|
||||
STYLE_DOT,
|
||||
1,
|
||||
false,
|
||||
false,
|
||||
true //
|
||||
);
|
||||
DrawResistance(resistance, ChartID());
|
||||
|
||||
//
|
||||
Print("Resistance Detected ...");
|
||||
@@ -917,19 +885,13 @@ void FindBullishTrend()
|
||||
}
|
||||
|
||||
//
|
||||
double hSwings[];
|
||||
datetime hSwingTimes[];
|
||||
|
||||
//
|
||||
double lSwings[];
|
||||
datetime lSwingTimes[];
|
||||
XOHCL hSwings[];
|
||||
XOHCL lSwings[];
|
||||
|
||||
//
|
||||
bool isBullishTrend = cBar.HasBullishTrend(
|
||||
hSwings,
|
||||
hSwingTimes,
|
||||
lSwings,
|
||||
lSwingTimes,
|
||||
false // Method 2 ...
|
||||
);
|
||||
if (!isBullishTrend)
|
||||
@@ -941,85 +903,13 @@ void FindBullishTrend()
|
||||
eaBarTracker.Waits();
|
||||
|
||||
//
|
||||
DrawTrendLine(
|
||||
ChartID(),
|
||||
"HSING-BULLTrend-" + ToString((int)hSwingTimes[ArraySize(hSwingTimes) - 1]) + "," + ToString((int)hSwingTimes[0]),
|
||||
0,
|
||||
hSwingTimes[ArraySize(hSwingTimes) - 1],
|
||||
hSwings[ArraySize(hSwings) - 1],
|
||||
hSwingTimes[0],
|
||||
hSwings[0],
|
||||
clrAqua,
|
||||
STYLE_DOT,
|
||||
1,
|
||||
false,
|
||||
false,
|
||||
true //
|
||||
DrawBullishTrend(
|
||||
cBar,
|
||||
hSwings,
|
||||
lSwings,
|
||||
ChartID() //
|
||||
);
|
||||
|
||||
//
|
||||
DrawTrendLine(
|
||||
ChartID(),
|
||||
"LSING-BULLTrend-" + ToString((int)lSwingTimes[ArraySize(lSwingTimes) - 1]) + "," + ToString((int)lSwingTimes[0]),
|
||||
0,
|
||||
lSwingTimes[ArraySize(lSwingTimes) - 1],
|
||||
lSwings[ArraySize(lSwings) - 1],
|
||||
lSwingTimes[0],
|
||||
lSwings[0],
|
||||
clrMagenta,
|
||||
STYLE_DOT,
|
||||
1,
|
||||
false,
|
||||
false,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
// Draw Arrow On Swing Highs ...
|
||||
for (int i = 0; i < ArraySize(hSwings); i++)
|
||||
{
|
||||
//
|
||||
double iPrice = hSwings[i];
|
||||
datetime iTime = hSwingTimes[i];
|
||||
|
||||
//
|
||||
DrawArrow(
|
||||
ChartID(),
|
||||
"HSIGN-BULLTrend-Arrow-" + ToString((int)iTime),
|
||||
0,
|
||||
iTime,
|
||||
iPrice,
|
||||
234,
|
||||
ANCHOR_BOTTOM,
|
||||
clrAqua,
|
||||
STYLE_SOLID,
|
||||
2 //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Draw Arrow On Swing Highs ...
|
||||
for (int i = 0; i < ArraySize(lSwings); i++)
|
||||
{
|
||||
//
|
||||
double iPrice = lSwings[i];
|
||||
datetime iTime = lSwingTimes[i];
|
||||
|
||||
//
|
||||
DrawArrow(
|
||||
ChartID(),
|
||||
"LSIGN-BULLTrend-Arrow-" + ToString((int)iTime),
|
||||
0,
|
||||
iTime,
|
||||
iPrice,
|
||||
233,
|
||||
ANCHOR_TOP,
|
||||
clrMagenta,
|
||||
STYLE_SOLID,
|
||||
2 //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
Print("Bullish Trend Detected ...");
|
||||
}
|
||||
@@ -1041,19 +931,13 @@ void FindBearishTrend()
|
||||
}
|
||||
|
||||
//
|
||||
double hSwings[];
|
||||
datetime hSwingTimes[];
|
||||
|
||||
//
|
||||
double lSwings[];
|
||||
datetime lSwingTimes[];
|
||||
XOHCL hSwings[];
|
||||
XOHCL lSwings[];
|
||||
|
||||
//
|
||||
bool isBearishTrend = cBar.HasBearishTrend(
|
||||
hSwings,
|
||||
hSwingTimes,
|
||||
lSwings,
|
||||
lSwingTimes,
|
||||
false // Method 2 ...
|
||||
);
|
||||
if (!isBearishTrend)
|
||||
@@ -1065,92 +949,21 @@ void FindBearishTrend()
|
||||
eaBarTracker.Waits();
|
||||
|
||||
//
|
||||
DrawTrendLine(
|
||||
ChartID(),
|
||||
"HSING-BEARTrend-" + ToString((int)hSwingTimes[ArraySize(hSwingTimes) - 1]) + "," + ToString((int)hSwingTimes[0]),
|
||||
0,
|
||||
hSwingTimes[ArraySize(hSwingTimes) - 1],
|
||||
hSwings[ArraySize(hSwings) - 1],
|
||||
hSwingTimes[0],
|
||||
hSwings[0],
|
||||
clrAqua,
|
||||
STYLE_DOT,
|
||||
1,
|
||||
false,
|
||||
false,
|
||||
true //
|
||||
DrawBearishTrend(
|
||||
cBar,
|
||||
hSwings,
|
||||
lSwings,
|
||||
ChartID() //
|
||||
);
|
||||
|
||||
//
|
||||
DrawTrendLine(
|
||||
ChartID(),
|
||||
"LSING-BEARTrend-" + ToString((int)lSwingTimes[ArraySize(lSwingTimes) - 1]) + "," + ToString((int)lSwingTimes[0]),
|
||||
0,
|
||||
lSwingTimes[ArraySize(lSwingTimes) - 1],
|
||||
lSwings[ArraySize(lSwings) - 1],
|
||||
lSwingTimes[0],
|
||||
lSwings[0],
|
||||
clrMagenta,
|
||||
STYLE_DOT,
|
||||
1,
|
||||
false,
|
||||
false,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
// Draw Arrow On Swing Highs ...
|
||||
for (int i = 0; i < ArraySize(hSwings); i++)
|
||||
{
|
||||
//
|
||||
double iPrice = hSwings[i];
|
||||
datetime iTime = hSwingTimes[i];
|
||||
|
||||
//
|
||||
DrawArrow(
|
||||
ChartID(),
|
||||
"HSIGN-BEARTrend-Arrow-" + ToString((int)iTime),
|
||||
0,
|
||||
iTime,
|
||||
iPrice,
|
||||
234,
|
||||
ANCHOR_BOTTOM,
|
||||
clrAqua,
|
||||
STYLE_SOLID,
|
||||
2 //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Draw Arrow On Swing Highs ...
|
||||
for (int i = 0; i < ArraySize(lSwings); i++)
|
||||
{
|
||||
//
|
||||
double iPrice = lSwings[i];
|
||||
datetime iTime = lSwingTimes[i];
|
||||
|
||||
//
|
||||
DrawArrow(
|
||||
ChartID(),
|
||||
"LSIGN-BEARTrend-Arrow-" + ToString((int)iTime),
|
||||
0,
|
||||
iTime,
|
||||
iPrice,
|
||||
233,
|
||||
ANCHOR_TOP,
|
||||
clrMagenta,
|
||||
STYLE_SOLID,
|
||||
2 //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
Print("Bearish Trend Detected ...");
|
||||
}
|
||||
|
||||
//
|
||||
// Find Bullish Order Block ...
|
||||
void FindBullishOrderBlock() {
|
||||
void FindBullishOrderBlock()
|
||||
{
|
||||
//
|
||||
XOHCL cBar;
|
||||
bool isInited = cBar.Init(
|
||||
@@ -1168,7 +981,8 @@ void FindBullishOrderBlock() {
|
||||
bool hasOB = cBar.HasBullishOrderBlock(
|
||||
obBar //
|
||||
);
|
||||
if (!hasOB) {
|
||||
if (!hasOB)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1178,7 +992,7 @@ void FindBullishOrderBlock() {
|
||||
//
|
||||
DrawTrendLine(
|
||||
ChartID(),
|
||||
"BULLOB-H-" + ToString((int) obBar.time),
|
||||
"BULLOB-H-" + ToString((int)obBar.time),
|
||||
0,
|
||||
obBar.time,
|
||||
obBar.high,
|
||||
@@ -1195,7 +1009,7 @@ void FindBullishOrderBlock() {
|
||||
//
|
||||
DrawTrendLine(
|
||||
ChartID(),
|
||||
"BULLOB-L-" + ToString((int) obBar.time),
|
||||
"BULLOB-L-" + ToString((int)obBar.time),
|
||||
0,
|
||||
obBar.time,
|
||||
obBar.low,
|
||||
@@ -1215,7 +1029,8 @@ void FindBullishOrderBlock() {
|
||||
|
||||
//
|
||||
// Find Bearish Order Block ...
|
||||
void FindBearishOrderBlock() {
|
||||
void FindBearishOrderBlock()
|
||||
{
|
||||
//
|
||||
XOHCL cBar;
|
||||
bool isInited = cBar.Init(
|
||||
@@ -1233,7 +1048,8 @@ void FindBearishOrderBlock() {
|
||||
bool hasOB = cBar.HasBearishOrderBlock(
|
||||
obBar //
|
||||
);
|
||||
if (!hasOB) {
|
||||
if (!hasOB)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1243,7 +1059,7 @@ void FindBearishOrderBlock() {
|
||||
//
|
||||
DrawTrendLine(
|
||||
ChartID(),
|
||||
"BEAROB-H-" + ToString((int) obBar.time),
|
||||
"BEAROB-H-" + ToString((int)obBar.time),
|
||||
0,
|
||||
obBar.time,
|
||||
obBar.high,
|
||||
@@ -1260,7 +1076,7 @@ void FindBearishOrderBlock() {
|
||||
//
|
||||
DrawTrendLine(
|
||||
ChartID(),
|
||||
"BEAROB-L-" + ToString((int) obBar.time),
|
||||
"BEAROB-L-" + ToString((int)obBar.time),
|
||||
0,
|
||||
obBar.time,
|
||||
obBar.low,
|
||||
|
||||
Reference in New Issue
Block a user