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

[amibroker] Re: Time shift winter - summer time



PureBytes Links

Trading Reference Links

That was a real problem for me too...and I guess for all european intraday traders. Any clue?

Another problem I have is to create a perpetual ES contract with all the expiration contracts. I know there is a merge function but how can I correct the spread, from let's say, the september contract to the december one?

Tradestation had a "modify quotes" function that allowed me to add subtract,divide or multiply price and volume fields from a selected date and time to another.
I couldn't find anything similar in amib.

Last question, I was used to the way tradestation handled the trading systems.

I mean the part that handled with one variable marketposition (+1 for long position, 0 for out of the market, -1 for short position), currentcontracts (number of open contracts for that position), avgprice, etc.

I find pretty hard to work on trading systems with amibroker, I read that there are 2 ways (one looping all bars and the other using CBT looping through signals and trades) not that quick as it was for tradestation.

I tried to use flip(buy,sell) and other instructions but I first need to define buy and sell and my buy and sell instructions need to know if a buy position is still there before using other buy or sell conditions.

I mean I need to write something like:

Inlongposition = flip(buy,sell);
Buy=(inlongposition and buy1conditions) or (not inlongposition and buy2conditions);
Sell=(inlongposition and sellconditions); // sellconditions only has to be checked if the market position is long

As the first instruction: Inlongposition = flip(buy,sell);
uses buy and sell that are initialized later in the code I got an error.

But I can't check buy and sell condition without knowing the market position.

For those of u that knows easy language:

I need to write something like:

If marketposition=+1 and currentcontracts=1 then buy 1 contract at X price or sell 1 contract at Y price;

If marketposition=+1 and currentcontracts>=2 then buy 1 contract at W price or sell 1 contract at Z price;

Any idea how could I do that?

How can have something like marketposition and currentcontract function of tradestation?

Wouldn't it be easier to add an array with the marketposition (and the number of contracts involved) to amibroker (like the buy, sell, short and cover ones)?

Thanks for ur attention,

Maurizio

--- In amibroker@xxxxxxxxxxxxxxx, "dubi1974" <gonzales74@xxx> wrote:
>
> Hi to all,
> 
> Does someone know the answer or has an answer to following question:
> 
> (and yes, I read already the documentation on  http://www.amibroker.com/kb/2006/03/19/how-does-the-daily-time-compression-work/)
> 
> If you receive real time data from IB in Europe CET then the US market opens at 15:30 and closes at 22:00 the European markets open at 9:00 and closes 17:30.
> If you compress this data to daily candles, you would receive the daily open, high, low, close etc.
> 
> But on October, 25 European clocks change to wintertime but the US 1 week later on November, 1. 
> So there will be 1 week were clocks will have a different time shift and from November, 1 they will be same again.
> 
> So between October, 25 and November, 1 the US market opens at 14:30 and closes at 21:00 the European markets open at 9:00 and closes 17:30. This is how the data is provided by IB TWS.
> 
> So the data saved in the Amibroker database for the US market will be shifted by 1 hour but just for this 1 week. 
> 
> My question now: How can you properly compress the data to get daily candles? 
> The problem is, if I would shift the US data 1 hour, I would shift also the history and the daily candles would be wrong. Especially for the US Futures Market, where there is a day and night session.
> 
> How are you solving this issue?
> 
> Best regards, dubi
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/