Accessing the Asking price of a Candle High

Section for discussions related to indicators, use of indicators, and building of trading stategies using indicators.

Moderator: admin

Accessing the Asking price of a Candle High

Postby stcowan » Thu Nov 15, 2012 4:51 am

Hi,

Could somebody please tell me how to refer to the asking price of the high/low of a candle. I would like to enter an order to buy 1 pip above the candle's high on the asking price in the update method.

If I use the code "valuemap.Rate = source.high[period] + 1*PipSize;" then this returns the bid price, but I want the asking price.

Thanks,
Sean.
stcowan
 
Posts: 2
Joined: Sun Jun 20, 2010 11:20 am

Re: Accessing the Asking price of a Candle High

Postby Ekaterina » Fri Nov 16, 2012 1:19 am

Hi stcowan,

To refer to the high/low of ask or bid price, please use the following code:

Code: Select all
bidsource = ExtSubscribe(id_bidsource, Instrument, tf, true, "bar");
asksource = ExtSubscribe(id_asksource, Instrument, tf, false, "bar");


Best regards,
Ekaterina
Ekaterina
 


Return to Discussions

Who is online

Users browsing this forum: No registered users and 9 guests