How to get current days high in a minute timeframe? MQL4

How to get current days high in a minute timeframe? MQL4

Manage alerts

Loading saved threads...

Aidana Bolat · External communityPost link
External question — Stack Overflow Stack Exchange Author: Aidana Bolat Original post: https://stackoverflow.com/questions/75912958 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. I'm new in MQL. I want to make a custom indicator that will return current day's highest price in a 1 minute timeframe. If I write: current_day_high= iHigh(0,PERIOD_D1, 0); Will it return current days high price? In an 1M timeframe it should be changing during the day until reaches the highest price and become static. How I can check if my custom indicator returns the values I want. Is there a way to store indicators values to check the calculations?
Quote
Report
PaulB · External communityPost link
External answer — Stack Overflow Stack Exchange Author: PaulB Original post: https://stackoverflow.com/a/75917695 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. The correct usage of iHigh is as follows. double iHigh( string symbol, // symbol int timeframe, // timeframe int shift // shift ); Therefore you should be using iHigh(NULL, PERIOD_D1, 0); This will return the current days High price. You can store any values as variables. If you feel the need to check the high (and I'm not sure why you would need to), you could use iHigh() with the current timeframe combined with iHighest() .
Quote
Report

Post Reply

Quoted from Forex.com.bd-Editorial External question — Stack Overflow Stack Exchange Author: Aidana Bolat Source score (net votes, not local likes): 0 Original post: https://stackoverflow.com/questions/75912958 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. I'm new in MQL. I want to make a custom indicator that will return current day's highest price in a 1 minute timeframe. If I write: current_day_high= iHigh(0,PERIOD_D1, 0); Will it return current days high price? In an 1M timeframe it should be changing during the day until reaches the highest price and become static. How I can check if my custom indicator returns the values I want. Is there a way to store indicators values to check the calculations?

Cancel quote

Checking account access…