Download MetaTrader 5

Problem Resolved [Please Delete Thread]

To add comments, please log in or register
Use searching on MQL5.community. It is easy!
Felix
23
Felix 2014.05.12 02:51 

Problem Resolved [Please Delete Thread]
Thank you

Ian Venner
2584
Ian Venner 2014.05.12 03:21  
I believe MT4 recieves ticks valued at the bid price, the ask is calculated by adding the spread value to it, so every time a bid is recieved an ask is calculated.
qjol
3243
qjol 2014.05.12 08:50  
SDC:
I believe MT4 recieves ticks valued at the bid price, the ask is calculated by adding the spread value to it, so every time a bid is recieved an ask is calculated.

nop, even when the ask himself is changing (without the bid) a tick is generated

i believe, the spread is calculated: "ask - bid"

Alain Verleyen
Moderator
30722
Alain Verleyen 2014.05.12 10:16  
qjol:

nop, even when the ask himself is changing (without the bid) a tick is generated

i believe, the spread is calculated: "ask - bid"

Right.
Tjipke de Vries
6314
Tjipke de Vries 2014.05.12 10:45  
SaiLyfee:

I am looking for somebody who can help in the making of an indicator that resembles the one shown in the picture below:

This picture is a sample of what I am after, hence why I am posting here in asking for the help of being able to have one such as this developed.



Everytime the tick chart moves on MT4 the bid and ask move together. The indicator parameters I am after require something that can show:

total count =

total bid =

total ask =

difference =

If you are able to assist please let me know here as soon as possible.

Regards


I think you have to find

current spread

spread maximum

spread minimum

spread average

for the last XXX ticks

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.05.12 22:37  
What I see right now, Ask and Bid always tallied, no matter what.
Ian Venner
2584
Ian Venner 2014.05.12 23:10  
qjol:

nop, even when the ask himself is changing (without the bid) a tick is generated

i believe, the spread is calculated: "ask - bid"

So you are saying the tick contains two values, both the ask and the bid price ?
qjol
3243
qjol 2014.05.12 23:15  

something like that: (didn't checked or tested)

static double BidTmpPrc = Bid, AskTmpPrc = Ask;
static int    BidCnt    = 0,   AskCnt    = 0;

if (Bid != BidTmpPrc)
   {
   BidTmpPrc = Bid;
   BidCnt++;
   }

if (Ask != AskTmpPrc)
   {
   AskTmpPrc = Ask;
   AskCnt++;
   }

Comment ("Ask Count =: ", AskCnt, " Bid Count =: ", BidCnt);
qjol
3243
qjol 2014.05.12 23:18  
SDC:
So you are saying the tick contains two values, both the ask and the bid price ?

not exactly

if the bid changes (even the ask stays) a tick is generated and if the ask changes (even the bid stays) also a tick is been generated

you can try it yourself, use the code above in section void OnTick() and see what happens

Ian Venner
2584
Ian Venner 2014.05.12 23:34  
qjol:

not exactly

if the bid changes (even the ask stays) a tick is generated and if the ask changes (even the bid stays) also a tick is been generated

Yes I knew that. My point was based on something I read somewhere before on the forum, that ticks recieved in the price feed do not contain the Ask price... It only contains bid price and spread. I thought you were telling me that is not correct.

Not that it really matters to the question asked by the OP, either way there are no separate Ask price ticks.

I guess what could be done is to log every time a change in the Ask happens without a change in the Bid and vice versa

qjol
3243
qjol 2014.05.12 23:38  
SDC:
Yes I knew that. My point was based on something I read somewhere before on the forum, that ticks recieved in the price feed do not contain the Ask price... It only contains bid price and spread. I thought you were telling me that is not correct.

both are true

what you have read is true for brokers who have a fix spread (or actually before ECN brokers were born ;-) )

what i had written is true for brokers who don't have a fix spread and use the bid and the ask separately

12
To add comments, please log in or register