jojocash:
The script works, just do not understand what it does :)
//+------------------------------------------------------------------+ //| test_script.mq4 | //| Copyright 2015, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2015, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict #property script_show_inputs int startN1,endN1,i; extern int startN=7,endN=8; //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { //--- i=1; while(TimeHour(iTime(NULL,0,i))>endN) i++; endN1=i; if(startN==0) while(TimeDay(iTime(NULL,0,i))==TimeDay(TimeCurrent())) { i++; } if(startN!=0) while(TimeHour(iTime(NULL,0,i))>=startN) { i++; } startN1=i; double highN=High[iHighest(NULL,0,MODE_HIGH,startN1-endN1,endN1)]; double lowN=Low[iLowest(NULL,0,MODE_LOW,startN1-endN1,endN1)]; Print("high=",DoubleToString(highN),", low=",DoubleToString(lowN)); } //+------------------------------------------------------------------+
barabashkakvn:
The script works, just do not understand what it does :)
Thank you , But I want to create a indicator like this photo ( NZDUSD ). If I used 7,8 ,the mean is time 7 & 8's Highest and Lowest.
Can you teach me how can I do it. THX
jojocash :
Teach? All right. Then the task №1: in the MetaEditor create a custom indicator.
Thank you , But I want to create a indicator like this photo ( NZDUSD ). If I used 7,8 ,the mean is time 7 & 8's Highest and Lowest.
Can you teach me how can I do it. THX
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
I want to get High & Low,like London Breakout strategy. But when MT4 up to Build 600, my code can't run.
How can I fix it, Please help me, thx