Recognizing a "spurious rogue price"

Post Reply
Dewey McG
Trader
Posts: 435
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

Recognizing a "spurious rogue price"

Post by Dewey McG »

I had an issue with an anomolous spike causing an SL I should not have had. The broker is being good about this and amending the trade. However, he said something interesting:

"Your EA 'chose' to execute on a price that was away from the market prior quotes. My own software monitors all prices to ensure that they are within a reasonably range based on the last quotes to ensure that I don't get 'faked out' in times of fast markets. I don't know whether the EA is your own code or not but for sure if it is then you should take some steps to confirm prices before your EA acts on them and that way you won't be at the mercy of spurious rogue prices."

How would you code your EA from not acting upon spurious rogue prices?
User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Re: Recognizing a "spurious rogue price"

Post by fxdaytrader »

Not sure, just an idea:

You could compare your local or server (vps) time with the time on the brokers server (e.g. only the minute, or better second). If the difference is to high, do not enter the trade.
phil_trade

Re: Recognizing a "spurious rogue price"

Post by phil_trade »

Hi

You could check delta pips betwwen Bid/Open M1 candle and Open/Close M1 of 2 last candles to insure a maximum gap

not tested :

Code: Select all

if ( MAthAbs( iOpen(MyPair,M1,0) - MarketInfo(MyPair,MODE_BID) ) < DeltaPipsMaxi * MarketInfo(MyPair,MODE_POINT) and
MAthAbs( iOpen(MyPair,M1,0) -  iClose(MyPair,M1,1)  < DeltaPipsMaxi * MarketInfo(MyPair,MODE_POINT)) then
...
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: Recognizing a "spurious rogue price"

Post by gaheitman »

Dewey McG wrote:I had an issue with an anomolous spike causing an SL I should not have had. The broker is being good about this and amending the trade. However, he said something interesting:

"Your EA 'chose' to execute on a price that was away from the market prior quotes. My own software monitors all prices to ensure that they are within a reasonably range based on the last quotes to ensure that I don't get 'faked out' in times of fast markets. I don't know whether the EA is your own code or not but for sure if it is then you should take some steps to confirm prices before your EA acts on them and that way you won't be at the mercy of spurious rogue prices."

How would you code your EA from not acting upon spurious rogue prices?
This is an interesting question. I think I would rather get out on my SL no matter why it was hit. In the rare case that it is bad data from a feed I'll take my chances arguing with my broker to set it right. If it triggers because of a global event causing the "Empty4 to hit the fan" (see what I did there? ;>) I'd rather get out while the getting is good. I'd hate to ignore a large change in price that was going against me and have it be a valid price....

George
Dewey McG
Trader
Posts: 435
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

Re: Recognizing a "spurious rogue price"

Post by Dewey McG »

gaheitman wrote:
Dewey McG wrote:I had an issue with an anomolous spike causing an SL I should not have had. The broker is being good about this and amending the trade. However, he said something interesting:

"Your EA 'chose' to execute on a price that was away from the market prior quotes. My own software monitors all prices to ensure that they are within a reasonably range based on the last quotes to ensure that I don't get 'faked out' in times of fast markets. I don't know whether the EA is your own code or not but for sure if it is then you should take some steps to confirm prices before your EA acts on them and that way you won't be at the mercy of spurious rogue prices."

How would you code your EA from not acting upon spurious rogue prices?
This is an interesting question. I think I would rather get out on my SL no matter why it was hit. In the rare case that it is bad data from a feed I'll take my chances arguing with my broker to set it right. If it triggers because of a global event causing the "Empty4 to hit the fan" (see what I did there? ;>) I'd rather get out while the getting is good. I'd hate to ignore a large change in price that was going against me and have it be a valid price....

George

Good point! If it were a major global event we would not want to wait for another tick to get out.

It's still a pain to deal both with the broker and the liquidity provider to get them to do the right thing.
Post Reply

Return to “Coders Hangout”