Just an idea:
TimeFrameSet(in5Minute);
entryLong = Cross(MACD(), Signal());
TimeFrameRestore();
entrylong = TimeFrameExpand (entrylong, in5Minute, expandFirst);
for ( i = 0; i< 12; i++)
{
Condition = Minute() == i*5 ;
Buy = entrylong && Condition;
PlotShapes(Buy * shapeUpArrow, colorGreen, 0, L);
}
Plot( C, "", 39, styleBar);
--- In [email protected], "jjj_98" <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I've got a program running that I only want to "buy" or "short" at
the
> end of each 5 minute bar. My larger timeframe is 15 minutes and I
use
> those signals to select which 5 minute signals to go with. I run
the
> progam on 1 minute time basis for stops and profit target
accuracy. Is
> there a way in the code to have the buy and short entries triggered
> only on the end of each 5 minute bar.
>
> What is happening now is that say I exit a signal on a trailing
stop at
> 2:02 pm. At 2:03 I get another signal based on the 15 minute and 5
> minute signals generated at 2:00 pm rather. what I'd like is for
the
> next entry to use the 2:05 pm 5 minute signal with the 2:00 pm 15
> minute signal.
>
> Can you help,
>
> Fred
>