last ... Om EURUSD ...

This commit is contained in:
2024-05-27 21:45:45 +03:30
parent 54160e7f99
commit 030e8e3c72
76 changed files with 1427 additions and 161210 deletions
+232 -50
View File
@@ -54,6 +54,10 @@ enum ENUM_XMRB_BUFFERS
// Ribbon 5 ...
XMRB_R5_FAST_LINE = 10,
XMRB_R5_SLOW_LINE = 11,
//
// Ribbon 5 ...
XMRB_R6_FAST_LINE = 12,
XMRB_R6_SLOW_LINE = 13,
};
//
@@ -65,33 +69,43 @@ struct XMRBInputs
//
// Ribbon 1 ...
int fast1Length; // Fast
int slow1Length; // Slow
int fast1Length; // Fast
int slow1Length; // Slow
ENUM_APPLIED_PRICE r1AppliedTo; // AppliedTo
//
// Ribbon 2 ...
int fast2Length; // Fast
int slow2Length; // Slow
int fast2Length; // Fast
int slow2Length; // Slow
ENUM_APPLIED_PRICE r2AppliedTo; // AppliedTo
//
// Ribbon 3 ...
int fast3Length; // Fast
int slow3Length; // Slow
int fast3Length; // Fast
int slow3Length; // Slow
ENUM_APPLIED_PRICE r3AppliedTo; // AppliedTo
//
// Ribbon 4 ...
int fast4Length; // Fast
int slow4Length; // Slow
int fast4Length; // Fast
int slow4Length; // Slow
ENUM_APPLIED_PRICE r4AppliedTo; // AppliedTo
//
// Ribbon 5 ...
int fast5Length; // Fast
int slow5Length; // Slow
int fast5Length; // Fast
int slow5Length; // Slow
ENUM_APPLIED_PRICE r5AppliedTo; // AppliedTo
//
// Ribbon 6 ...
int fast6Length; // Fast
int slow6Length; // Slow
ENUM_APPLIED_PRICE r6AppliedTo; // AppliedTo
//
// Calculation ...
ENUM_MA_METHOD ribbonMode; // Mode
ENUM_APPLIED_PRICE ribbonAppliedTo; // Applied To
ENUM_MA_METHOD ribbonMode; // Mode
//
// Presentation ...
@@ -116,33 +130,43 @@ struct XMRBInputs
{
//
// Ribbon 1 ...
fast1Length = 0; // Fast
slow1Length = 0; // Slow
fast1Length = 0; // Fast
slow1Length = 0; // Slow
r1AppliedTo = PRICE_HIGH; // AppliedTo
//
// Ribbon 2 ...
fast2Length = 0; // Fast
slow2Length = 0; // Slow
fast2Length = 0; // Fast
slow2Length = 0; // Slow
r2AppliedTo = PRICE_OPEN; // AppliedTo
//
// Ribbon 3 ...
fast3Length = 0; // Fast
slow3Length = 0; // Slow
fast3Length = 0; // Fast
slow3Length = 0; // Slow
r3AppliedTo = PRICE_CLOSE; // AppliedTo
//
// Ribbon 4 ...
fast4Length = 0; // Fast
slow4Length = 0; // Slow
fast4Length = 0; // Fast
slow4Length = 0; // Slow
r4AppliedTo = PRICE_MEDIAN; // AppliedTo
//
// Ribbon 5 ...
fast5Length = 0; // Fast
slow5Length = 0; // Slow
fast5Length = 0; // Fast
slow5Length = 0; // Slow
r5AppliedTo = PRICE_TYPICAL; // AppliedTo
//
// Ribbon 6 ...
fast6Length = 0; // Fast
slow6Length = 0; // Slow
r6AppliedTo = PRICE_LOW; // AppliedTo
//
// Calculation ...
ribbonMode = MODE_EMA; // Mode
ribbonAppliedTo = PRICE_CLOSE; // Applied To
ribbonMode = MODE_EMA; // Mode
//
// Presentation ...
@@ -157,39 +181,49 @@ struct XMRBInputs
{
//
// Ribbon 1 ...
fast1Length = 3; // Fast
slow1Length = 5; // Slow
fast1Length = 20; // Fast
slow1Length = 50; // Slow
r1AppliedTo = PRICE_HIGH; // AppliedTo
//
// Ribbon 2 ...
fast2Length = 8; // Fast
slow2Length = 13; // Slow
fast2Length = 20; // Fast
slow2Length = 50; // Slow
r2AppliedTo = PRICE_OPEN; // AppliedTo
//
// Ribbon 3 ...
fast3Length = 21; // Fast
slow3Length = 34; // Slow
fast3Length = 20; // Fast
slow3Length = 50; // Slow
r3AppliedTo = PRICE_CLOSE; // AppliedTo
//
// Ribbon 4 ...
fast4Length = 55; // Fast
slow4Length = 89; // Slow
fast4Length = 20; // Fast
slow4Length = 50; // Slow
r4AppliedTo = PRICE_MEDIAN; // AppliedTo
//
// Ribbon 5 ...
fast5Length = 144; // Fast
slow5Length = 233; // Slow
fast5Length = 20; // Fast
slow5Length = 50; // Slow
r5AppliedTo = PRICE_TYPICAL; // AppliedTo
//
// Ribbon 6 ...
fast6Length = 20; // Fast
slow6Length = 50; // Slow
r6AppliedTo = PRICE_LOW; // AppliedTo
//
// Calculation ...
ribbonMode = MODE_EMA; // Mode
ribbonAppliedTo = PRICE_CLOSE; // Applied To
ribbonMode = MODE_EMA; // Mode
//
// Presentation ...
showFastMa = true; // Show Fast
showSlowMa = true; // Show Slow
showRibbon = true; // Show Ribbon
showFastMa = true; // Show Fast
showSlowMa = true; // Show Slow
showRibbon = false; // Show Ribbon
}
//
@@ -203,19 +237,17 @@ struct XMRBInputs
result =
//
(fast1Length > 2 &&
fast2Length > fast1Length &&
fast3Length > fast2Length &&
fast4Length > fast3Length &&
fast5Length > fast4Length &&
fast2Length > 2 &&
fast3Length > 2 &&
fast4Length > 2 &&
fast5Length > 2 &&
fast6Length > 2 &&
slow1Length > fast1Length &&
slow2Length > fast2Length &&
slow3Length > fast3Length &&
slow4Length > fast4Length &&
slow5Length > fast5Length &&
slow2Length > slow1Length &&
slow3Length > slow2Length &&
slow4Length > slow3Length &&
slow5Length > slow4Length
slow6Length > fast6Length
//
)
//
@@ -237,6 +269,7 @@ struct XMRBInputs
result = MathMax(result, fast3Length);
result = MathMax(result, fast4Length);
result = MathMax(result, fast5Length);
result = MathMax(result, fast6Length);
//
result = MathMax(result, slow1Length);
@@ -244,6 +277,7 @@ struct XMRBInputs
result = MathMax(result, slow3Length);
result = MathMax(result, slow4Length);
result = MathMax(result, slow5Length);
result = MathMax(result, slow6Length);
//
return result;
@@ -308,6 +342,8 @@ public:
ArraySetAsSeries(r4SlowBuffer, true);
ArraySetAsSeries(r5FastBuffer, true);
ArraySetAsSeries(r5SlowBuffer, true);
ArraySetAsSeries(r6FastBuffer, true);
ArraySetAsSeries(r6SlowBuffer, true);
//
mHandler = iCustom(
@@ -321,31 +357,41 @@ public:
"",
mInputs.fast1Length, // Fast
mInputs.slow1Length, // Slow
mInputs.r1AppliedTo, // AppliedTo
//
// Ribbon 2 ...
"",
mInputs.fast2Length, // Fast
mInputs.slow2Length, // Slow
mInputs.r2AppliedTo, // AppliedTo
//
// Ribbon 3 ...
"",
mInputs.fast3Length, // Fast
mInputs.slow3Length, // Slow
mInputs.r3AppliedTo, // AppliedTo
//
// Ribbon 4 ...
"",
mInputs.fast4Length, // Fast
mInputs.slow4Length, // Slow
mInputs.r4AppliedTo, // AppliedTo
//
// Ribbon 5 ...
"",
mInputs.fast5Length, // Fast
mInputs.slow5Length, // Slow
mInputs.r5AppliedTo, // AppliedTo
//
// Ribbon 6 ...
"",
mInputs.fast6Length, // Fast
mInputs.slow6Length, // Slow
mInputs.r6AppliedTo, // AppliedTo
//
// Calculation ...
"",
mInputs.ribbonMode, // Mode
mInputs.ribbonAppliedTo, // Applied To
mInputs.ribbonMode, // Mode
//
// Presentation ...
"",
@@ -638,7 +684,7 @@ public:
//
// Copy Required Items ...
int Copy21Fast(
int CopyR2Fast(
int start, // Start
int count, // Number of Items for read
double &buffer[], // Dest Buffer
@@ -1041,6 +1087,115 @@ public:
);
}
//
// Ribbon 6 ...
//
// Fast ...
//
double GetR6Fast(
int barIndex // Bar Index
)
{
//
if (barIndex < 0)
{
barIndex = 0;
}
//
Calculate();
//
int count = ArraySize(r6FastBuffer);
if (barIndex >= count)
{
barIndex = count - 1;
}
//
return r6FastBuffer[barIndex];
}
//
// Copy Required Items ...
int CopyR6Fast(
int start, // Start
int count, // Number of Items for read
double &buffer[], // Dest Buffer
bool forceClean = true // Force To Clean buffer
)
{
//
// Update Calculations ...
Calculate();
//
// Copy Items ...
return Copy(
start,
count,
r6FastBuffer,
buffer,
forceClean
//
);
}
//
// Slow ...
//
double GetR6Slow(
int barIndex // Bar Index
)
{
//
if (barIndex < 0)
{
barIndex = 0;
}
//
Calculate();
//
int count = ArraySize(r6SlowBuffer);
if (barIndex >= count)
{
barIndex = count - 1;
}
//
return r6SlowBuffer[barIndex];
}
//
// Copy Required Items ...
int CopyR6Slow(
int start, // Start
int count, // Number of Items for read
double &buffer[], // Dest Buffer
bool forceClean = true // Force To Clean buffer
)
{
//
// Update Calculations ...
Calculate();
//
// Copy Items ...
return Copy(
start,
count,
r6SlowBuffer,
buffer,
forceClean
//
);
}
//
// Protected ...
protected:
@@ -1065,6 +1220,8 @@ private:
double r4SlowBuffer[];
double r5FastBuffer[];
double r5SlowBuffer[];
double r6FastBuffer[];
double r6SlowBuffer[];
//
// Tools ...
@@ -1222,6 +1379,31 @@ private:
r5SlowBuffer
//
);
//
// Ribbon 6 ...
//
// Fast Buffer ...
CopyBuffer(
mHandler,
XMRB_R6_FAST_LINE,
0,
totalBars,
r6FastBuffer
//
);
//
// Slow Buffer ...
CopyBuffer(
mHandler,
XMRB_R6_SLOW_LINE,
0,
totalBars,
r6SlowBuffer
//
);
}
};