last ...
This commit is contained in:
@@ -5085,3 +5085,104 @@ for (int i = 1; i < pivotsCount - 1; i++)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
double lastMax = 0;
|
||||
while (ArraySize(tmp) > 0)
|
||||
{
|
||||
//
|
||||
int maxIDX = ArrayMaximum(tmp);
|
||||
if (maxIDX <= -1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
double max = tmp[maxIDX];
|
||||
double maxLesser = FindLesserThanValue(
|
||||
max,
|
||||
pivots,
|
||||
true);
|
||||
if (maxLesser == -1)
|
||||
{
|
||||
maxLesser = boundaryMin;
|
||||
}
|
||||
|
||||
//
|
||||
if (price < max && price > maxLesser)
|
||||
{
|
||||
//
|
||||
if (longSupport)
|
||||
{
|
||||
LogMessage("Create Long Max Breakeout Signal");
|
||||
}
|
||||
|
||||
//
|
||||
if (shortSupport) {
|
||||
LogMessage("Create Max Short Breakeout Signals");
|
||||
}
|
||||
}
|
||||
|
||||
// //
|
||||
// // Check Max ...
|
||||
// if (
|
||||
// price < max &&
|
||||
// (lastMax == 0 || (lastMax > 0 && price > lastMax)))
|
||||
// {
|
||||
// //
|
||||
// // Create Long for Aboves ...
|
||||
// if (longSupport)
|
||||
// {
|
||||
// //
|
||||
// type = POSITION_TYPE_BUY;
|
||||
// mode = X_ORDER_MODE_STOP;
|
||||
|
||||
// //
|
||||
// tp = tpValue == 0 && placeTP
|
||||
// ? lastMax
|
||||
// : tpValue;
|
||||
// entry = max;
|
||||
// sl = slValue == 0 && placeSL
|
||||
// ? maxLesser
|
||||
// : slValue;
|
||||
|
||||
// //
|
||||
// signal = CreateSignal(
|
||||
// symbol,
|
||||
// period,
|
||||
// type,
|
||||
// mode,
|
||||
// entry,
|
||||
// volume,
|
||||
// tp,
|
||||
// sl);
|
||||
|
||||
// //
|
||||
// Add(
|
||||
// signal,
|
||||
// signals);
|
||||
// }
|
||||
|
||||
//
|
||||
// Short for Belows ...
|
||||
|
||||
//
|
||||
// Long for Below Ups ...
|
||||
// }
|
||||
|
||||
//
|
||||
LogMessage("MAX: " + ToString(max));
|
||||
LogMessage("MAX Lesser: " + ToString(maxLesser));
|
||||
LogMessage("MAX Last: " + ToString(lastMax));
|
||||
|
||||
//
|
||||
Remove(
|
||||
max,
|
||||
tmp //
|
||||
);
|
||||
lastMax = max;
|
||||
}
|
||||
|
||||
//
|
||||
LogMessage("FFFF");
|
||||
|
||||
Reference in New Issue
Block a user