[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: Multi Timeframe Question



PureBytes Links

Trading Reference Links

apfxtrader,
 
Ooops, I thought it was working ok but it only is grabbing the long and short trades that line up on the 55 minute time frame and not any of the others.  Not sure why this is.  From the code it looks like it will check for a buy every 1 minute or whatever my base timeframe is  and execute only when the 5 minute entrylong is true and the condition is true.
 
Got any thoughts on what might be happening?  Here's my code below:
 

for(j=0;j<12;j++)

{

EntryTimeCondition = (Minute() == (4 + j*5));

Buy = TimeFrameExpand(LongSignal, in5Minute) AND TimeFrameExpand(SignalLatchLong, in15Minute)

AND (TimeNum()>93400) AND (TimeNum() <153000) AND EntryTimeCondition;

Short = TimeFrameExpand(ShortSignal, in5Minute) AND TimeFrameExpand(SignalLatchShort, in15Minute)

AND (TimeNum()>93400) AND (TimeNum() <153000) AND EntryTimeCondition;

}

----- Original Message -----
From: apfxtrader
Sent: Thursday, June 21, 2007 4:48 PM
Subject: [amibroker] Re: Multi Timeframe Question

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 amibroker@xxxxxxxxxps.com, "jjj_98" <jjj_98@xxx> 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
>

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___


Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool.