lastmanstanding swing point indicator (how to get candle IDs of swing dots?)
-
I want to use the following indicator to draw lines at swing highs and lows.
I tried to get the candle IDs of the dots painted by the indicator via "find object by color" (it doesn't put them into buffers), but it still does not find them. Does anybody know how I can get the values?
0_1653372733524_lastmanstandingindicatorv11.mq4
From the indicator code, the drawing seems to be configured here. But I still don't know how to find it in a loop:
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//--- indicator buffers mapping
SetIndexBuffer(0,majorSwingHigh); //associates array with buffer
SetIndexStyle(0,DRAW_ARROW,EMPTY,MajorSwingSize,MajorSwingColor);
SetIndexArrow(0,108); // drawing wingding 108
SetIndexLabel(0,"Major Swing High"); -
You should run strategy tester on your custom indicator every time you want to use it with your EA.
By doing that you can decide whether the indicator can be used or not in your strategy. -
Found a way, it works via Indicator is visible

-
Yes it works, but the signal is delayed, and the trade doesn't open at the candle after the blue circle, right?