hi i want to see the difference between the bid and ask price on the chart or any where on the multichart program and if possible i can add the fees for each trade.
thanks
p.s . i tried to use the indicator spread diff but it did not work.
Spread in forex
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: spread in forex
how did you try it?hi i want to see the difference between the bid and ask price on the chart or any where on the multichart program and if possible i can add the fees for each trade.
thanks
p.s . i tried to use the indicator spread diff but it did not work.
what data feed are you using?
what is the symbol?
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: spread in forex
This question from TJ is key. Look at what you want to achieve ("plot the difference between bid and ask price") and contrast that with the code of the default "Spread - Diff" indicator:how did you try it?hi i want to see the difference between the bid and ask price on the chart or any where on the multichart program and if possible i can add the fees for each trade.
thanks
p.s . i tried to use the indicator spread diff but it did not work.
Code: Select all
inputs: DataSeries1( Close of data1 ), DataSeries2( Close of data2 ) ;
Plot1( DataSeries1 - DataSeries2, "SprdDiff" ) ;
Regards,
Josh
Re: spread in forex
thanks for ur replay
well am trying to get the spread the cost of each time ibuy or sale
am using mbt uk as a broker and data feed for forex
am tryingto see eur/usd when i use the indcator spread diff it tell me data is missing as i think it need 2 data to get the diffrent.
ihope its clear now.
thanks
well am trying to get the spread the cost of each time ibuy or sale
am using mbt uk as a broker and data feed for forex
am tryingto see eur/usd when i use the indcator spread diff it tell me data is missing as i think it need 2 data to get the diffrent.
ihope its clear now.
thanks
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: spread in forex
Yes, that's correct. The "Spread - Diff" indicator needs two data series applied to that chart. So if you add the Bid as data series one, and the Ask as data series two, you can calculate the (absolute) spread between them.am tryingto see eur/usd when i use the indcator spread diff it tell me data is missing as i think it need 2 data to get the diffrent.
Btw, in your second post you want to achieve something different than you stated in your first post:
hi i want to see the difference between the bid and ask price on the chart or any where on the multichart program and if possible i can add the fees for each trade.
This difference is significant in terms of coding. In your first example, you'll be looking at an indicator that calculates the spread including commission from MB Trading. In the second example, you'll calculate the spread only when you have opened an position (added with the commission for that position?). And in this second example, you want to "get" the spread, which suggests to me that that is something different than plotting a value (i.e. where do you want to "put" that retrieved data?).well am trying to get the spread the cost of each time ibuy or sale.
(Note that the commission for MB Trading is different depending on which order (limit or market) you use.)
To borrow a line from TJ : do you have a flowchart? What do you want to achieve?
Regards,
Josh
Re: spread in forex
ok thanks for all ur replays
first i want to get the different in ask and bid price to know the cost without the commission from mbT i tried to use the spread diff and it want work i have one chart where it show only eur/usd and i have attached a pic of the data that i need to put do i ask in the data series 1 and bid in data series 2 it want work it say error can you please show me how am i missing something.
thanks
and about the fees in terms of market order i think i should learn that later on not now now i need to find out this thing as its really confusing.
first i want to get the different in ask and bid price to know the cost without the commission from mbT i tried to use the spread diff and it want work i have one chart where it show only eur/usd and i have attached a pic of the data that i need to put do i ask in the data series 1 and bid in data series 2 it want work it say error can you please show me how am i missing something.
thanks
and about the fees in terms of market order i think i should learn that later on not now now i need to find out this thing as its really confusing.
- Attachments
-
- Capture.JPG
- (62.09 KiB) Downloaded 1932 times
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: spread in forex
Do you have the bid/ask quotes?ok thanks for all ur replays
first i want to get the different in ask and bid price to know the cost without the commission from mbT i tried to use the spread diff and it want work i have one chart where it show only eur/usd and i have attached a pic of the data that i need to put do i ask in the data series 1 and bid in data series 2 it want work it say error can you please show me how am i missing something.
thanks
and about the fees in terms of market order i think i should learn that later on not now now i need to find out this thing as its really confusing.
Can you plot a chart of bid only? and a chart of ask only?
ps. to speed up the replies, please provide as much information as possible. You should make screen shots of as many screens you have, including the chart that shows "nothing".
Re: spread in forex
ok now i think i know whats i need
is it that i need a bid chart and a ask chart and a trade chart and the trad chart will have the spread diff is correct or not and any way here is my chart that i thought just to show a price of the cost anywhere on the screen it doesn't matter as an indicator on the bottom or on top
is it that i need a bid chart and a ask chart and a trade chart and the trad chart will have the spread diff is correct or not and any way here is my chart that i thought just to show a price of the cost anywhere on the screen it doesn't matter as an indicator on the bottom or on top
- Attachments
-
- Capture.JPG
- (265.3 KiB) Downloaded 1901 times
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: spread in forex
you can select trade, bid, or ask for your chartok now i think i know whats i need
is it that i need a bid chart and a ask chart and a trade chart and the trad chart will have the spread diff is correct or not and any way here is my chart that i thought just to show a price of the cost anywhere on the screen it doesn't matter as an indicator on the bottom or on top
- Attachments
-
- format instrument.gif
- (19.38 KiB) Downloaded 2162 times
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: spread in forex
for spread-diff:
- Attachments
-
- InsideAsk InsideBid.gif
- (12.75 KiB) Downloaded 2434 times
Re: spread in forex
ok thanks do you know why i cant get the ask prise as the bid is fine but for ask i get no data do you thing it got to do with the my broker as its my data feed is the same as my broker.
thanks
thanks
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: spread in forex
It should not make a difference if your broker is also your datafeed.ok thanks do you know why i cant get the ask prise as the bid is fine but for ask i get no data do you thing it got to do with the my broker as its my data feed is the same as my broker.
thanks
are you looking at live data or data already saved in your computer?
please go to QuoteManager,
highlight your symbol,
from the Main menu, select EDIT > Fields to collect.
Make sure the bid and ask are selected.
Re: spread in forex
i did what u asked me to do i added all the tick minutes day for bid and ask
but its the same i get no data for ask only maybe i have to wait for tonight after 10pm london time when the market will start and then i can see the ask price.
dose any one know if mb trading they do provide ask price for forex .
one more thing
do you know what is the difference between the forex and fx exchange as i just realised that my eur/usd is on forex and gbp/usd is on fx exchange is there any big different?
thanks
but its the same i get no data for ask only maybe i have to wait for tonight after 10pm london time when the market will start and then i can see the ask price.
dose any one know if mb trading they do provide ask price for forex .
one more thing
do you know what is the difference between the forex and fx exchange as i just realised that my eur/usd is on forex and gbp/usd is on fx exchange is there any big different?
thanks
- Attachments
-
- Capture.JPG
- (132.31 KiB) Downloaded 1902 times
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: spread in forex
That's correct, you'll see the saved bid/ask as soon as there is real-time data saved in the QuoteManager after you've changed these settings.i did what u asked me to do i added all the tick minutes day for bid and ask
but its the same i get no data for ask only maybe i have to wait for tonight after 10pm london time when the market will start and then i can see the ask price.
No, MB Trading does not provide historical ask data, but in real-time trading they (of course) show bid/ask prices, so the solution proposed by TJ should work.dose any one know if mb trading they do provide ask price for forex .
Don't know the exact difference, but probably something to do with Trading Hours, 'contract' specifications, and/or routing differences. According to MC support, the MB Trading symbols are added automatically to the FX exchange for order routing.do you know what is the difference between the forex and fx exchange as i just realised that my eur/usd is on forex and gbp/usd is on fx exchange is there any big different?
Regards,
Josh
Re: spread in forex
I use this code to display the spread on the market scanner.
Multi input moves the decimal point the correct number of places to display the whole number.
Using DTN IQ with FXCM symbols EURUSD.FXCM multi = 10000. The Multi must be corrected for each symbol as it may be different.
I use this code to display the spread in the upper left corner of a chart.
Code: Select all
Input: Multi(1);
Value1 = Absvalue((Q_Bid - Q_Ask) * Multi);
if (Value1) > (Value1[1]) then
SetPlotColor(1, Green);
if (Value1) < (Value1[1]) then
SetPlotColor(1, Red);
Plot1( Value1, "Spread" ) ;
Using DTN IQ with FXCM symbols EURUSD.FXCM multi = 10000. The Multi must be corrected for each symbol as it may be different.
I use this code to display the spread in the upper left corner of a chart.
Code: Select all
Input: DecPlaces(4), Multip(1), TxtSize(20);
variables:
n1(0), n2(0), intrabarpersist id(0), intrabarpersist del.id(False),OE(""),PosI(0),PColor(Red),PosII(0);
PosI = ((insideask - insidebid)* Multip);
PosII = absvalue(PosI);
OE = NumToStr(PosII,DecPlaces);
If PosI > PosI[1] Then PColor = green
else
If PosI < PosI[1] Then PColor = red;
if LastBarOnChart_s then begin
n1 = getappinfo(aiLeftDispDateTime);
n2 = (getappinfo(aiHighestDispValue) - getappinfo(aiLowestDispValue))*0.99 + getappinfo(aiLowestDispValue);
if del.id then text_delete(id);
del.id = False;
if barstatus = 2 and id > 0 then del.id = True; // delete label next tick
id = text_new_s(JulianToDate(n1), StrToNum(FormatTime("HHmmss",n1)), n2, OE );
Text_SetSize(id, TxtSize);
Text_SetStyle(id, 0, 2);
Text_SetColor(id, PColor);
Text_SetAttribute(id, 1, true);
end;
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: spread in forex
Thanks for sharing Trip.
(Where the '*0.1' is for fractional pips).
I'm not saying this is a better way, or the best way to calculate this - but perhaps it might be handy.
Regards,
Josh
With some trail and error, I've coded that in my Market Scanner 'spread in ticks' indicator with..Multi input moves the decimal point the correct number of places to display the whole number.
Using DTN IQ with FXCM symbols EURUSD.FXCM multi = 10000. The Multi must be corrected for each symbol as it may be different.
Code: Select all
once begin
if category = 12 then
toTickValue = 1 / ( MinMove / (PriceScale*0.1) )
else
toTickValue = 1 / (MinMove / PriceScale);
end;
spread = (InsideBid - InsideAsk) * toTickValue;
I'm not saying this is a better way, or the best way to calculate this - but perhaps it might be handy.
Regards,
Josh