Measure difference between MA/EMA and Market price
Created at 10 Mar 2015, 08:11
Measure difference between MA/EMA and Market price
10 Mar 2015, 08:11
Hi. Hope someone can help me. I'm looking for a method to measure the pip difference between a MA and Market Price and allocate that to a variable. What would the code look like to do something like that?
Thanks
Replies
modarkat
12 Mar 2015, 17:51
Difference in pips between SMA and Bid price:
SimpleMovingAverage sma; protected override void OnStart() { sma = Indicators.SimpleMovingAverage(MarketSeries.Close, 14); } protected override void OnTick() { var pipsDifference = (Symbol.Bid - sma.Result.LastValue) / Symbol.PipSize; }
@modarkat
davidp13
11 Mar 2015, 09:16
RE:
Any help pls...
davidp13 said:
@davidp13