Detect New Month High/Low

 
Good day,
I am trying to detect the higher/lower of month.
I really can't see where i do wrong. Can you help me please ?

datetime start_mnth = iTime(NULL,PERIOD_MN1,0);
MqlDateTime structure_date_mnth;

TimeToStruct(start_mnth,structure_date_mnth);

//--- week: 
                USD_plus_hi = iHigh(USD_paires[v],PERIOD_D1,iHighest(USD_paires[v],PERIOD_D1,MODE_HIGH,(structure_date_mnth.day)-1,0));
                USD_plus_lo = iLow (USD_paires[v],PERIOD_D1,iLowest (USD_paires[v],PERIOD_D1,MODE_LOW ,(structure_date_mnth.day)-1,0));

Regards

 
Email Temporaire:
Good day,
I am trying to detect the higher/lower of week.
I really can't see where i do wrong. Can you help me please ?



Regards

structure_date_mnth.day_of_week

Try the above instead of :

structure_date_mnth.day
 
Yashar Seyyedin #:

Try the above instead of :

it doesn't work.
i don't look for wich day of week, but :
- wich day (int index) from today is
- the highest/lowest of
- this month

and then, I get the double price (iHigh / iLow) for signal in case of break out/down.

 
Email Temporaire #:

it doesn't work.
i don't look for wich day of week, but :
- wich day (int index) from today is
- the highest/lowest of
- this month

and then, I get the double price (iHigh / iLow) for signal in case of break out/down.

high_value=iHigh(USD_paires[v], PERIOD_MN1, 0);
day_index=iHighest(USD_paires[v],PERIOD_D1,MODE_HIGH,(structure_date_mnth.day)-1,0);
 
i found
structure_date_now.day
regards.