Developing a New Kind of Price Bar

Section for all discussions related to development using Indicore API/SDK.

Moderator: admin

Developing a New Kind of Price Bar

Postby Cameron » Sun Aug 29, 2010 11:55 pm

One of the interesting features of Market Scope is that it charts either the bid history or offer history separately? In my simple view there is only one market. The low in any period is the lowest of either the lowest offer or the lowest bid given. Similarly the high of any period is the higher of the highest bid or the highest offer taken.

Just in the past month we've seen GBP/USD+ bid/offer spread briefly move out to 30 pips when the market was moving quickly. This can have significant impact on results of indicators.

The FXCM trading engine pushes out the bid and offers in the code.Tick stream. I'm wondering if you think it would be possible to create a new period bar that shows the lowest ask as its low and the higest bid as it high? The open and close of the bar would be the first and last tick traded respectively.

This may require working with the com API in C. I'm happy doing this but I just wanted to get your thoughts if it would be possible before I headed of spending valuable programing time on this.

Also if I get this up and running would other members of the Forum be interested in helping me test it on different markets?

Cheers Cam
Cameron
FXCodeBase: Confirmed User
 
Posts: 4
Joined: Sun Aug 29, 2010 9:44 am

Re: Developing a New Kind of Price Bar

Postby Nikolay.Gekht » Mon Aug 30, 2010 7:41 am

Do you mean something like this indicator? viewtopic.php?f=17&t=1916.

This indicator shows a candle which is average between bid and ask and also shows the lowest bid and highest ask of the period.

Unlike many other chart applications, the indicator's candles are the regular candles from the point of view of marketscope, so, you can operate them exactly as with the regular price candles.
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: Developing a New Kind of Price Bar

Postby Cameron » Tue Aug 31, 2010 4:05 am

Yes thanks for the heads up.

I discovered this afteroon that if I remove an indicator from the list in the Manage Custom Indicator dialog box in Market Scope it actually deletes the Lua file from the hard drive. "Ouch"

Really annoying when you've just spent the afternoon developing it. I'm now backing up my indicator and strategy folders.

Cheers Ca,
Cameron
FXCodeBase: Confirmed User
 
Posts: 4
Joined: Sun Aug 29, 2010 9:44 am

Re: Developing a New Kind of Price Bar

Postby Nikolay.Gekht » Tue Aug 31, 2010 8:42 am

Cameron wrote:I discovered this afteroon that if I remove an indicator from the list in the Manage Custom Indicator dialog box in Market Scope it actually deletes the Lua file from the hard drive. "Ouch"

Really annoying when you've just spent the afternoon developing it. I'm now backing up my indicator and strategy folders.

Hm... Never think that it could be developed this way. Thank you for pointing to the problem. I usually develop the most of the code under SDK and never used add/remove indicator function of TS while developing, just copy the indicators/strategies to appropriate folders to add and from to remove from TS.
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: Developing a New Kind of Price Bar

Postby MeiniOz » Wed Nov 24, 2010 5:53 am

Please see next post
Last edited by MeiniOz on Wed Nov 24, 2010 6:49 am, edited 1 time in total.
MeiniOz
FXCodeBase: Confirmed User
 
Posts: 34
Joined: Wed Nov 17, 2010 4:39 pm

Re: Developing a New Kind of Price Bar

Postby MeiniOz » Wed Nov 24, 2010 5:54 am

I know this thread is a bit old but I still like to comment on it.

Cameron wrote:One of the interesting features of Market Scope is that it charts either the bid history or offer history separately? In my simple view there is only one market.


You are correct there is only one market however the situation with FX trading in general is that we have to deal with the bid and ask price. This is not Marketscope specific. Obviously wherever there is trading there is always a bid and ask price, but for instance in share trading we have a single chart. Unlike with FX charts, share charts give us the last traded price. Having a bid and ask chart is never as accurate or clean for the technical analyst to deal with as one single chart with actual traded prices. But having a bid and ask chart gives us a better picture of the market situation.

So, as you point out, if the market moves fast in one direction, it leaves a gap behind until that gap gets filled with orders again, creating a momentary increased spread. However that usually does not have much of an impact on the chart because it does not create spikes, as it is only a matter of time until orders have caught up again closing the gap.

The only time I can see a problem is in a market where there is lack of interest and orders at the current price are being removed, so that that price level completely disappears leaving the impression that the price has changed, whereas it is only the available bid or ask that has, even though there may have never been a trade. I would assume that is rather rarely the case.

Another issue we have is this: Lets say for instance the price of a currency pair rises and sell orders are being chewed up by buyers coming into the market, the moment one price level has disappeared, the ask price on the chart rises, although there may never be an actual trade happening at that new price level. But again in a well traded market, I don't think that is a problem, only if there was a large gap in available offers and the next level would be much higher, causing the chart to produce a spike that does not correlate with trades.

Cameron wrote:The low in any period is the lowest of either the lowest offer or the lowest bid given. Similarly the high of any period is the higher of the highest bid or the highest offer taken.

The ask price at any given time is always higher than a bid price so your reasoning does not make much sense to me. When you intend to buy you need to find a seller so you switch to the ask chart, and when you want to sell you look for buyers so you switch to the bid chart. Mixing up bid and ask will not only screw with your trend lines.

Have you ever wondered why there are so many instances where you can draw a line across three or more points, even sloping ones? That is because many people draw lines as soon there are two points so they expect a third point, which will influence where they put their orders. If your candles look different to anyone elses, you will get different lines. The market only turns at a point because a majority of people agree on it based on the same chart that they all see. If you have a different chart to anyone else you have a serious disadvantage.

Hope this makes sense.
Meini
MeiniOz
FXCodeBase: Confirmed User
 
Posts: 34
Joined: Wed Nov 17, 2010 4:39 pm

Re: Developing a New Kind of Price Bar

Postby George » Fri Feb 04, 2011 5:30 am

A bunch of really good of information . Specially for the people who are new in Forex trading journal .
Thank you very much for sharing .
The great thing in this world is not so much where you stand, as in what direction you are moving.
George
 
Posts: 1
Joined: Mon Jan 31, 2011 1:22 am


Return to Discussions

Who is online

Users browsing this forum: No registered users and 6 guests