Hi
I code a trailingfunktion below one of the last candles. But
this code returns the lowest Bid price - fine so far but i need the Ask price.
int TrailingCandles = 2;
int minIdx;
//-- Tiefpreis aus X(TrainilgCandles) Candels
double low[];
ArraySetAsSeries(low,true);
CopyLow(_Symbol,PERIOD_D1,0,10,low);
minIdx = ArrayMinimum(low,0,TrailingCandles);
lowest = low[minIdx];
I can't find where ti adjust Ask/Bid - when i tried with CopyHigh it also returns the Bid price.
Any ideas? Thank you.
It does not return the lowest Bid price
It returns the lowest close price for certain bar - those are OHLC (open,high,low and close) not Bid/Ask values. You do not have historical Bid and/or Ask values
//-- haha: if you know a no-spread broker please tell me i am veeeery interested ;-)
When you try the code on a 1M chart you find out that the return is the lowest Bid of all TrailingCandels.
I deald with fxcm tradingstation2 befor, there you can switch between Bid and Ask chart - looks like
MT5 does not do this. So the ClosePrice seams to be the CloseBidPrice ???
Close price was a Bid or a Ask befor - there is not one price, there is always a spread - does not make a sense to me?
//-- haha: if you know a no-spread broker please tell me i am veeeery interested ;-)
When you try the code on a 1M chart you find out that the return is the lowest Bid of all TrailingCandels.
I deald with fxcm tradingstation2 befor, there you can switch between Bid and Ask chart - looks like
MT5 does not do this. So the ClosePrice seams to be the CloseBidPrice ???
What does not make a sense?
Bid and Ask prices do not have to be the same as close price at all. That all depends on your broker
Here my thinking:
Because the chart plots a Bid price based draw - my "lowest price" is a Bid.
So CopyLow() returns the "Historical Bid" ... it looks like MT5 draws only Bid charts ???
A Ask based chart would look slightly different . I know this for 100% because i worked
with tradingstation2 that can do Bid/Ask Charts.
Is the question it clear so far?
greez....
Yep, the question was if i chequed it on runtime - post is not there anymore maby a mql5.com bug - move on on Bid/Ask anyway....
Here my thinking:
Because the chart plots a Bid price based draw - my "lowest price" is a Bid.
So CopyLow() returns the "Historical Bid" ... it looks like MT5 draws only Bid charts ???
A Ask based chart would look slightly different . I know this for 100% because i worked
with tradingstation2 that can do Bid/Ask Charts.
Is the question it clear so far?
greez....
I will try once more : check the market watch and on some brokers compare what you see (and think) that is a bid price. That price does not have to be bid price at all. It all depends on your broker (and the type of your broker)
Is that clear so far?
Yep, the question was if i chequed it on runtime - post is not there anymore maby a mql5.com bug - move on on Bid/Ask anyway....
Here my thinking:
Because the chart plots a Bid price based draw - my "lowest price" is a Bid.
So CopyLow() returns the "Historical Bid" ... it looks like MT5 draws only Bid charts ???
A Ask based chart would look slightly different . I know this for 100% because i worked
with tradingstation2 that can do Bid/Ask Charts.
Is the question it clear so far?
greez....
There is no ask charts with MT5.
There is no historical ask with MT5.
However the spread is available for each 1 minute bar, so you can estimate your ask price.
Then the Solution is =>i need to take Bid and add spread myself to simulate an Ask.
Looked to me like a "un-"cleanest way to do .... but knowing that there is no AskHistory
i can make it work this way - thanx....
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi
I code a trailingfunktion below one of the last candles. But
this code returns the lowest Bid price - fine so far but i need the Ask price.
int TrailingCandles = 2;
int minIdx;
//-- Tiefpreis aus X(TrainilgCandles) Candels
double low[];
ArraySetAsSeries(low,true);
CopyLow(_Symbol,PERIOD_D1,0,10,low);
minIdx = ArrayMinimum(low,0,TrailingCandles);
lowest = low[minIdx];
I can't find where ti adjust Ask/Bid - when i tried with CopyHigh it also returns the Bid price.
Any ideas? Thank you.