Indicators: Trade Sessions Indicator

 

Trade Sessions Indicator:

This Indicator is based on DRAW_FILLING buffers.

The input parameters are absent, the TimeTradeServer(), TimeGMT() functions are used.

There is an opportunity to use the time changes to the summer time, at present time it's a primitive and realized with the TimeDaylightSavings(); function

So, after the time change to the summer time, all of the history changes it's time and vice versa.

Author: Dmitry

Trade Sessions Indicator

 

Hi,

I Keep getting an error on line 158

      HighSession=iHigh[ArrayMaximum(iHigh,WHOLE_ARRAY,rates_total)];

Array out of range. Any suggestions of how to fix this?

 
scottu:

Hi,

I Keep getting an error on line 158

      HighSession=iHigh[ArrayMaximum(iHigh,WHOLE_ARRAY,rates_total)];

Array out of range. Any suggestions of how to fix this?

Read about the ArrayMaximum() function:

ArrayMaximum

The function searches a maximal element in a one-dimension numeric array.

int  ArrayMaximum(
   double  array[],               // array for search
   int     start=0                // index to start checking with
   int     count=WHOLE_ARRAY,     // number of checked elements
   );

Parameters

array[]

[in]  A numeric array, in which search is made.

start=0

[in]  Index to start checking with.

count=WHOLE_ARRAY

[in]  Number of elements for search. By default, searches in the entire array (cnt=WHOLE_ARRAY).

Second parameter can't be negative (WHOLE_ARRAY=-1)
 
Is this indicator works on MT4?
 

FX 24 Hours per Day (based on dailyfx article)

  • The Forex Market trades 24 hours a day 5 days a week
  • The greatest amount of volatility happens during market open overlap.
  • Forex traders can enter and exit trades at any time during the global business day

The 24 hour 5 day access afforded to Forex traders has many unique advantages not available to traders in other markets. Forex traders’ 24 hour access to the market allow them to manage trades any time in the face of impending risks, take advantage of global trading opportunities whenever they arise, and trade during market time overlaps.


Divided in to four trading sessions; Sydney, Tokyo, London/Europe and New York, traders have their pick of trading times to meet fit their schedules. However, when sensitive global markets are rocked by overnight news or the latest “flavor” of financial crisis, Forex traders can be comforted that they can exit a trade or enter 24 hours a day, 5 days a week. Unlike their stock trading brethren who have to sit idly by while economic releases or other high impact news rocks the market, Forex traders can reduce risk by exiting positions without having to wait for an opening bell.

When the phrase “Money never sleeps” was created, the Forex market could have been the inspiration. Spanning across the globe through a vast network of interconnected banks, the Forex market provides many trading opportunities that happen around the clock. A scheduled interest rate announcement at 12 AM ET in Australia can be traded as easily as the US interest rate announcement at 2pm ET because the Forex market doesn’t close. Forex traders are not restricted by time when it comes to trading opportunities that happen after the equity markets have closed.


Trade Session Overlaps provide volatility and liquidity

In addition, Forex traders can take advantage of the volatility generated during times when major markets overlap. The most volatile Forex market conditions occur when the Sydney and Tokyo equity trading sessions overlap, the Tokyo/London overlap, and the London/New York overlap. By not being restricted by a closing or opening bell, Forex traders can place trades during these very liquid and volatile market times. Remember that market volatility is a trader’s life blood. The search for liquidity and volatility end here with the 24-hour/5 day a week Forex market. Traders can manage risk with time restrictions, take advantage of trading opportunities at any time and trade during trade session overlaps.

 
I have saved this indicator with my template, but everytime I open the MT5 it wont showed up and I have to add it manually. Do you how know to fix this?
 
Riyadus:
I have saved this indicator with my template, but everytime I open the MT5 it wont showed up and I have to add it manually. Do you how know to fix this?

Save Template as default.tpl

 

Hi Dmitry,


great indicator. One question:

What do I have to set to get exact times? For example, for Germany I would like to see the exact time from 08:00 to 17:30?

In the US session I want to see 14:30 to 22:00 (German Time)

How do I enter the times in the code?

 
Christoph:

Hi Dmitry,


great indicator. One question:

What do I have to set to get exact times? For example, for Germany I would like to see the exact time from 08:00 to 17:30?

In the US session I want to see 14:30 to 22:00 (German Time)

How do I enter the times in the code?

Hi,

First you must change int to double constant and (for index trading, no forex) :

const int   AsiaOpen=0;
const int   AsiaClose=6;
const int   EuropaOpen=8;
const double   EuropaClose=16.5;
const double   AmericaOpen=14.5;
const int   AmericaClose=21;


Works for me.

Regards

 
Hi, I live in Dubai-United Arab Emirates. How to set the time correctly plz advice. Thanks!
 

Hey, 

Look at the pic carefully (attached file). as you can see my candlestick pattern color changes as soon as it enters into one of the sessions. I don't want that. I want my candlestick pattern color to be same during any the sessions. I am not able to find any settings to how to change. Can somebody help me in this.

Files:
Reason: