| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack (2) | Thread Tools | Display Modes |
|
|||
|
Quote:
if(NewBar()) doEnterTrade(); bool NewBar() { static datetime dt = 0; if (Time[0] != dt) { dt = Time[0]; return(true); } return(false); } Mark |
|
|||
|
Quote:
if(DayOfWeek() < TUESDAY) return(0); Mark |
|
|||
|
Quote:
|
|
||||
|
Asked & Answered
Hi all,
I thought I had my answers with the following code: Code:
double range[5];
for(int i=1;i<5;i++)
{
range[i]={High[i]-Low[i]};
int Max=ArrayBsearch(range,10,WHOLE_ARRAY,1,MODE_ASCEND);
double MaxRange=(High[Max]-Low[Max])/Point;
}
Print("Max Range: ",MaxRange," found at index: ",Max);
Any further help would be appreciated. SaxMan Last edited by SaxMan; 08-03-2007 at 07:37 PM. Reason: found error |
|
||||
|
Error Fixed
Quote:
Code:
double range[5];
for(int i=1;i<5;i++)
{
range[i]={High[i]-Low[i]};
int Max=ArrayMaximum(range);
double MaxRange=(High[Max]-Low[Max])/Point;
}
Print("Max Range: ",MaxRange," found at index: ",Max);
Hope this helps, SaxMan |
|
||||
|
Same Code with additions
Added:
* Minimum range * Vertical Lines to highlight Max and Min range bars: Code:
double range[2000];
for(int i=1;i<2000;i++)
{
range[i]={High[i]-Low[i]};
int Max=ArrayMaximum(range,WHOLE_ARRAY,1);
int Min=ArrayMinimum(range,WHOLE_ARRAY,1);
double MaxRange=(High[Max]-Low[Max])/Point;
double MinRange=(High[Min]-Low[Min])/Point;
}
Print("Max Range: ",MaxRange," pips found at index: ",Max);
Print("Min Range: ",MinRange," pips found at index: ",Min);
int time1=Time[Max];
int time2=Time[Min];
ObjectCreate("stats1",OBJ_VLINE,0,0,0);
ObjectSet("stats1", OBJPROP_TIME1, time1);
ObjectSet("stats1", OBJPROP_COLOR, Red);
ObjectSet("stats1", OBJPROP_WIDTH, 1);
ObjectCreate("stats2",OBJ_VLINE,0,0,0);
ObjectSet("stats2", OBJPROP_TIME1, time2);
ObjectSet("stats2", OBJPROP_COLOR, Blue);
ObjectSet("stats2", OBJPROP_WIDTH, 1);
|
|
||||
|
extern Bool Direction_Up=true;
if(Direction_Up==true) Dir="UP"; ///////////This is wrong conversion - How do I convert it to the proper syntax???? ObjectCreate("Dir", OBJ_LABEL, 0, 0, 0); ObjectSetText("Dir", 10, "Arial", White);///////////This is wrong - How do I get it to display UP on the screen???? ObjectSet("Dir", OBJPROP_CORNER, 1); ObjectSet("Dir", OBJPROP_XDISTANCE, 36); ObjectSet("Dir", OBJPROP_YDISTANCE, 120);/// Dave <><<< Last edited by iscuba11; 08-04-2007 at 03:41 AM. |
![]() |
| Bookmarks |
| Tags |
| histogram, forex, ZUP_v1.mq4 |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/questions/270-ask.html
|
||||
| Posted By | For | Type | Date | |
| OzFx System:) - Page 639 | This thread | Refback | 06-21-2008 10:53 PM | |
| Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart | This thread | Refback | 12-08-2007 12:46 PM | |