Great stuff - thanks :)

--- In [email protected], reinsley <reins...@...> wrote:
>
> 
> Hi,
> 
> Many useless lines in this code, but you should get what you want
> 
> Best regards
> 
> |// HighLowDailyMap
> // High and Low of the first hour
> 
> delta = 0;
> 
> starttime = 080000;
> endtime = 083000;// write 084500 to catch 090000 in 15' TU
> 
> segments = IIf( Interval() < *inDaily*, Day(), Month() );
> //_TRACE("Interval ="+Interval());
> segments = segments != Ref( segments , -1 );
> tn = TimeNum();
> //_TRACE("tn = "+tn);
> timecond = tn >= starttime *AND* tn <= endtime;
> //_TRACE("timecond ="+timecond );
> firstBarOfDay = timecond ;//TimeNum() >= starttime ;//segments ;//
> //_TRACE("firstBarOfDay1 ="+firstBarOfDay );
> firstBarOfDay = firstBarOfDay - Ref(firstBarOfDay,-1);
> //_TRACE("firstBarOfDay ="+firstBarOfDay );
> 
> xHigh = ValueWhen(timecond, HighestSince(firstBarOfDay,*High*));
> //_TRACE("xHigh ="+xHigh );
> xLow = ValueWhen(timecond, LowestSince(firstBarOfDay,*Low*));
> 
> DH = TimeFrameCompress(xHigh, *inDaily*, *compressLast*);
> DL = TimeFrameCompress(xLow, *inDaily*, *compressLast*);
> DH = TimeFrameExpand(DH,*inDaily*,*expandFirst*);
> DL = TimeFrameExpand(DL,*inDaily*,*expandFirst*);
> 
> SetBarsRequired(-2,-2);
> SetChartOptions(0, *chartShowDates*);
> Plot(*C*,"C",*colorWhite*,64);
> Plot(IIf(tn > endtime ,DH,*Null*),"\nDH",*colorRed*,*styleThick*);
> Plot(IIf(tn > endtime ,DL,*Null*),"DL",*colorBrightGreen*,*styleThick*);
> Plot( timecond, "", *colorLightGrey*, *styleArea*|*styleOwnScale*,0,1);
> 
> _SECTION_BEGIN( "Price" );
> _N( *Title* = StrFormat( "{{NAME}} - {{INTERVAL}} {{DATE}} \nOp %g, \nHi 
> %g, \nLo %g, \nCl %g (%.1f%%) {{VALUES}}", *Open* , *High* , *Low*, 
> *Close* , SelectedValue( ROC( *C*, 1 ) ) ) );
> _SECTION_END();
> 
> 
> Plot( segments, "", *colorDarkBlue*, *styleHistogram* | *styleOwnScale* 
> | *styleDashed* | *styleNoLabel* );
> 
> //2.61% support AND resistance
> 
> res261 = DL + (DH - DL)  * 2.618;
> 
> sup261 = DH - (DH - DL)* 2.618;
> 
> Plot( res261 , "", *colorGrey50*, 1 );//"261,8% Resistance."
> 
> Plot( sup261 , "", *colorGrey50*, 1 );//"261,8% Support."|
> 
> 
> Le 19/04/2010 15:44, dralexchambers a écrit :
> >
> > Hi,
> >
> > How would I plot the High/Low for an intraday range:
> >
> > StartTime = 10:00
> > EndTime = 17:00
> >
> > At 17:00 I would like to plot the Highest High of the previous 10:00 
> > to 17:00 range, and the lowest low.
> >
> > When 10am the next day comes, the indicator stops plotting and a new 
> > range is calculated.
> >
> > Thanks,
> > Alex
> >
> >
>


Reply via email to