Which price defines the Close, High and Low prices when running a signal on MC using Interactive Brokers for trading FX (IdealPro)
Is it the Inside Ask, Inside Bid, Mid-Price between the two, or Traded price?
In case the question is unclear, what I am asking is if I for example have a script to buy at market if Close is above the High of a previous bar. Is is then the current Best Bid (Inside Bid) that needs to be higher than the Best Bid seen during the previous bar, or what do these words (Close, High, Low) actually represent?
I know that under "Format Instrument"/"settings"/"Quote fiels" I can choose Bid, Ask or Trade, but that would only be useful if MC actually received all these parameters from IB, but as far as I can see, MC does not receive them all for historical data (I assume only one of the three BID/ASK/Traded are actually feeded from IB to MC, but cant find out which one...)
Furthermore, the word Close used in combination with order generation, how do I know if that means current BID/ASK/Traded?
Thank you
Which price defines the Close, High and Low prices? [SOLVED]
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Which price defines the Close, High and Low prices?
Hello andy4444,
A script works with values from chart. If we are talking about a signal script then it references value from data series 1 by default, as it can be applied only to the first one (though nothing prevents you to have "if close of data2 > high of data3 then ..." in your signal applied to data1).
If you want to reference ask and bid values, you should have them plotted as additional data series and adjust your code (as in the example above).
The other variant is to use InsideBid and InsideAsk in your code. They will take the best bid and ask from the status line of your chart (so it is valid for real-time calculation only, not for backtesting).
A script works with values from chart. If we are talking about a signal script then it references value from data series 1 by default, as it can be applied only to the first one (though nothing prevents you to have "if close of data2 > high of data3 then ..." in your signal applied to data1).
If you want to reference ask and bid values, you should have them plotted as additional data series and adjust your code (as in the example above).
The other variant is to use InsideBid and InsideAsk in your code. They will take the best bid and ask from the status line of your chart (so it is valid for real-time calculation only, not for backtesting).
Re: Which price defines the Close, High and Low prices?
Thank you for your reply Andrew.
I'm using MC with IB feed (the default settings that MC came with). Do you know which FX price (bid?/ask?/mid?) is then fed into MC from IB?, or how can I find out?
Thank you
Carl
I'm using MC with IB feed (the default settings that MC came with). Do you know which FX price (bid?/ask?/mid?) is then fed into MC from IB?, or how can I find out?
Thank you
Carl
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Which price defines the Close, High and Low prices? [SOLVED]
For forex from IB:
"Trades" in MC = bids from IB
Asks in MC = asks from IB
Bids in MC = bids from IB
"Quote Field" is the name of the setting you should change to switch among them.
"Trades" in MC = bids from IB
Asks in MC = asks from IB
Bids in MC = bids from IB
"Quote Field" is the name of the setting you should change to switch among them.