Indicator work for combined BID/ASK/TRADE Bar  [SOLVED]

Questions about MultiCharts and user contributed studies.
Guest

Indicator work for combined BID/ASK/TRADE Bar

Postby Guest » 24 Apr 2007

How can I make a Indicator (For example Moving Average) work for the
combination of a Instrument on a chart.

Lets say I combined a 1 minute Bid and 1min ask and a 1 Min trade chart for the mini S+P in one window as an overlay

How can I make a Moving Average Work for the 1 min bid/ask/trade Bar. (witch resulted because of the overlay)??

User avatar
Stanley Miller
Posts: 556
Joined: 26 Jul 2005
Has thanked: 3 times

Postby Stanley Miller » 24 Apr 2007

Use average(close of data1/close of data2/close of data3, Length);

Guest

Postby Guest » 25 Apr 2007

Stanley,

unfortunately I am unable to repruduce this because I never wrote a easy language study besides copying pasting and compileing them.

How would this look like as a useable formula?

Many thanks!

User avatar
Stanley Miller
Posts: 556
Joined: 26 Jul 2005
Has thanked: 3 times

  [SOLVED]

Postby Stanley Miller » 25 Apr 2007

Please explain in further details what exactly would you like to plot.

BUGSY
Posts: 13
Joined: 25 Apr 2007

Postby BUGSY » 25 Apr 2007

Stanley,

I am trying to put on a BID/ASK data series (1Tick Bar) a Moving Average with a Length of 1 Period.

That way I expected to have a perfect Tick line Chart.

The problem is that the Moving average will only consider the Bid price only or the ask price only.

How can I make it work that the moving average calculates it from both prices.

As an additional explanation please take a look at the attached picture!

Many Thanks.
Attachments
EXAMPLETICK.jpg
(209.37 KiB) Downloaded 2022 times

User avatar
Stanley Miller
Posts: 556
Joined: 26 Jul 2005
Has thanked: 3 times

Postby Stanley Miller » 25 Apr 2007

Stanley,

I am trying to put on a BID/ASK data series (1Tick Bar) a Moving Average with a Length of 1 Period.
Do you want to have the average of BID divided by ASK? Is this correct? Or average of (BID + ASK) / 2 or something else? Please be more exact in your explanations.

BUGSY
Posts: 13
Joined: 25 Apr 2007

Postby BUGSY » 25 Apr 2007

As you can see prices on the attached chart are representing a series of prices. Non of these prices are coming in at the same time.

Non of the Dots are parallel at the same time on the chart.

I just want to say that the bid and the ask are a series of prices on your tick charts and could be considered as a stream of prices. Non of them is parallel.

I just wanted to connect them with eatch other to simulate a stream of prices.

Unfortunately I am not able to create custom symbols and synthatically simulate this flow of data into one stream.

I just want to connect one dot with the other since they are beneath eatch other on the chart no matter whether it is a bid or a ask price. I thought since I can do this on a bid only chart or ask only chart this could work on a bid/ask overlay as well because a Moving Average with a 1 bar length connects the dots with eatch other. How can I do this with a series of bid ask prices?

CQG has a function called BATS. You can choose tic charts that are a sereies of bid and ask prices. Unfortunately I cannot chart IB TWS IDEALPRO FOREX with CQG.

Once I saw your overlay of bid and ask prices (witch are also plotted as a flow or stram of bid and ask dots) of the EURUSD IDEALPRO FX I thought lets connect them with eatch other with a 1 bar length MOVING AVERAGE and I have my primary trading tool that I am used to working with CQG.
A BID/ASK tick chart. Usually this works with a couple of other programms but non of them can chart IB FOREX Data...........

User avatar
Stanley Miller
Posts: 556
Joined: 26 Jul 2005
Has thanked: 3 times

Postby Stanley Miller » 25 Apr 2007

It's possible to overlay two tick series but you can't connect them with a chronological line.

BUGSY
Posts: 13
Joined: 25 Apr 2007

Postby BUGSY » 25 Apr 2007

Stanley,


if I purchase OWN DATA and use it with TS,

will I be able to connect these Dots in TS chronologically.

AND/OR am I able to create Custom Symbols in TS and produce
a flow or stream of bid and ask prices of one Symbol

Many thanks Stanley!!

Guest

Postby Guest » 25 Apr 2007

How would the studyformula look like for the

1.) average of the BID divided by the ASK


2.) average of (BID + ASK) / 2


THX

Peter

Postby Peter » 25 Apr 2007

I encountered the same problem too. Is there any solution?

BUGSY
Posts: 13
Joined: 25 Apr 2007

Postby BUGSY » 26 Apr 2007

Stanley,



as you can see on the attached picture I overlayed a 1 min bid and a 1 min ask charts. The moving average is a simple one but works only for the
bid or the ask. How can I make it work for the whole bar. Not only the bid part or the ask part of the bar?


THX
Attachments
picture3.png
(112.42 KiB) Downloaded 1988 times

User avatar
Stanley Miller
Posts: 556
Joined: 26 Jul 2005
Has thanked: 3 times

Postby Stanley Miller » 26 Apr 2007

Stanley,

as you can see on the attached picture I overlayed a 1 min bid and a 1 min ask charts. The moving average is a simple one but works only for the
bid or the ask. How can I make it work for the whole bar. Not only the bid part or the ask part of the bar?

THX
It's quite easy if you are using interval bars. Just apply Custom Line study and specify average( (close of data1 + close of data2) / 2, 14) as an input or create a new study:

Code: Select all

plot1(average( (close of data1 + close of data2) / 2, 14));

BUGSY
Posts: 13
Joined: 25 Apr 2007

Postby BUGSY » 26 Apr 2007

Stanley,


if I purchase OWN DATA and use it with TS,

will I be able to connect these Dots in TS chronologically.

AND/OR am I able to create Custom Symbols in TS and produce
a flow or stream of bid and ask prices of one Symbol

Many thanks

User avatar
Stanley Miller
Posts: 556
Joined: 26 Jul 2005
Has thanked: 3 times

Postby Stanley Miller » 26 Apr 2007

Stanley,


if I purchase OWN DATA and use it with TS,

will I be able to connect these Dots in TS chronologically.
No
AND/OR am I able to create Custom Symbols in TS and produce
a flow or stream of bid and ask prices of one Symbol
I'm not sure what you mean

BUGSY
Posts: 13
Joined: 25 Apr 2007

Postby BUGSY » 26 Apr 2007

AND/OR am I able to create Custom Symbols in TS and produce
a flow or stream of bid and ask prices of one Symbol
I'm not sure what you mean[/quote]



Can I merge the Bid and the Ask into one Field with Own Data?

User avatar
Stanley Miller
Posts: 556
Joined: 26 Jul 2005
Has thanked: 3 times

Postby Stanley Miller » 26 Apr 2007

It's theoretically possible if you'll receive quotes via DDE and will combine 2 streams in the Excel.

BUGSY
Posts: 13
Joined: 25 Apr 2007

Postby BUGSY » 26 Apr 2007

Yes I tried that already but Excel is tooo slow to follow!

denizen2
Posts: 125
Joined: 17 Jul 2005
Has thanked: 8 times
Been thanked: 1 time

Postby denizen2 » 26 Apr 2007

Here is my 'solution' to creating a 'synthetic' price series that represents a price half way between the Bid and Ask ticks.

The issue, as already stated, is that Bid ticks and Ask ticks do not normally occur at the same time, and therefore it is not possible to treat them as the same data series. They can be separately plotted, but not used as separate input data series to any function or indicator.

I believe the only way to use both the Bid and Ask prices as inputs to a function or indicator is if the separate price-series of Ticks are transformed into some kind of fixed-time-interval bars. That means you could use something VERY small such as 1-sec bars, if you want.

The other way is to transform each of the tick data series into an almost equivalent non-tick data series, such as the simplest moving average of length=1. THEN you have two data-series that are NOT tick data-series, per se, but is instead a 'normal' time-based data series. And then you can take the PRICE-average of these two TIME-average data series and you now have a data series that is half way between the two tick-data series. :D

So you have two ways to accomplish your objective: (1) convert each to 1-sec data series first, and/or (2) convert each (Bid and Ask) price series into a TIME-average (of Length=1).

Here is some example code for the second approach:
Step-1: create a 'function' that is VERY simple and short (for convenience), such as: (and call it MA1):

{MA1 function}
input: price(numericseries);
MA1 = (price +price[1])*0.5;

Step-2: create an indicator (to test, by plotting it):

{Plot simple MA , for length=1}
input: Price(close);
Plot1(MA1(price));

After compiling both, create a chart with only the Bid and Ask prices of some symbol. Create a 'Custom 1 Line' Indicator on the chart just created. Insert the following in the indicator input labeled 'Formula':

(MA1(close of data1) +MA1(close of data2))/2


Important: Remember to click the properties tap and select the Sub-chart#1, AND select the 'Scaling' tab and check the 'Scale Type' as "Same as Symbol'.

That is it 8) ! You can see the BidAsk line 'solution', and you will also have a function that can be used in signals the same way it was used in the indicator.

Attached is an example plot, where I plotted both the Ask and Bid ticks, and the associated separate Bid and Ask TIME-series lines (shown as dotted). In between you will see the Aqua colored and thicker line of the simulated 'Trade' line that is half-way between the other two lines.

Hope that helps you :) .
Attachments
CombinedBidAskPrices.PNG
(62.78 KiB) Downloaded 2010 times

BUGSY
Posts: 13
Joined: 25 Apr 2007

Postby BUGSY » 27 Apr 2007

denizen2,

thanks a lot for your work! Unfortunately it is not what I was looking for.

I really need a real and exact "oscillation effect" between the bid and ask price.


i hope TS will implemet as soon as possible Synthetic Symbols.

This will be the final solution!

Once agai thank you very mutch!

Guest

Postby Guest » 30 Apr 2007

i hope TS will implemet as soon as possible Synthetic Symbols.

This will be the final solution!

Once agai thank you very mutch![/quote]


TS Support,


do you and if yes when are you going to implement Synthetic symbols??

Many Thanks

Guest

Postby Guest » 30 Apr 2007

TS Support,


do you and if yes when are you going to implement Synthetic symbols??

Many Thanks

User avatar
Kate
Posts: 758
Joined: 08 Dec 2006

Postby Kate » 03 May 2007

Synthetic symbols will be implemented but the ETA isn't specified yet.


Return to “MultiCharts”