Below, I have the start of my code for a London Breakout EA which triggers at 8am (London Start). It calculates the dailyResistance and dailySupport from the Asian Session from 12am - 8am.
What I would like to do is draw a rectangle on my chart for this area (12am-8am, High-Low) each day and then extend two horizontal lines in this fixed position up until midnight.
I have never worked with object classes before so could somebody give me an example of how to achieve this please. Blue rectangle, 50% transparency and two red lines, if you could provide me with an example including colour and transparency.
Thank you in advance,
CPerry.
voidOnTick()
{
if (IsTradingTime() && RangeCheckFlag == 0)
{
RangeCheckFlag = 1;
int highestIndex = iHighest(_Symbol, 0, MODE_HIGH, NoOfHours, 1);
int lowestIndex = iLowest(_Symbol, 0, MODE_LOW, NoOfHours, 1);
dailyResistance = iHigh(_Symbol, 0, highestIndex);
dailySupport = iLow(_Symbol, 0, lowestIndex);
// DRAW THE RECTANGLE ONCE IN THIS INSTANCE THIS PART OF CODE IS CALLED ONCE A DAY
}
Rest of code...
// ADD TO THE LENGTH OF THE HORIZONTAL LINES BY ONE NEW BAR - EACH MINUTE A NEW BAR IS ADDED (M1)
}
Good evening forum,
Below, I have the start of my code for a London Breakout EA which triggers at 8am (London Start). It calculates the dailyResistance and dailySupport from the Asian Session from 12am - 8am.
What I would like to do is draw a rectangle on my chart for this area (12am-8am, High-Low) each day and then extend two horizontal lines in this fixed position up until midnight.
I have never worked with object classes before so could somebody give me an example of how to achieve this please. Blue rectangle, 50% transparency and two red lines, if you could provide me with an example including colour and transparency.
Thank you in advance,
CPerry.