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

Re: [amibroker] Easy way to close out a trade at the end of day?



PureBytes Links

Trading Reference Links

exit on this
Sell = ref(timenum(),-1)<161000 and timenum()>=161000;


-- 
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm


On 24/09/06, scourt2000 <stevehite@xxxxxxxxxxx> wrote:
>
>
> Hi,
>
> I have a scalp trade system where I'm finding that many of my big
> losers are due to holding overnight.  What I'd like to do is that if
> the last scalp trade doesn't get an exit signal by 16:10 EST (e-mini
> futures close at 16:15 EST), I'll just close out the trade for
> whatever profit or loss there is.
>
> I've been getting away with using the various options of the
> ApplyStop() function without having to delve into a for() loop that
> digs into the Buy/Sell/BuyPrice/SellPrice arrays to alter things.
>
> Is there an easy way to accomplish this aside from going through the
> above-mentioned arrays in a for() loop (up through BarCount) at the
> bottom of my strategy in order to alter the exit signals and exit
> prices?
>
> Thanks for the help,
>
> Steve
>
>
>
>
>
>
>
>
> 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 other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
>