| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| workaround to detect 2 decimal points pairs (e.g. gold) https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1334 |
Page 1 of 1 |
| Author: | fxdaytrader [ Wed Dec 26, 2012 10:06 pm ] |
| Post subject: | workaround to detect 2 decimal points pairs (e.g. gold) |
At the brokers, gold is referred to as 3 digits pair. But it has 2 decimal points. There are some workarounds to deal with it at pips/point (pips2dbl = multiplier*Point) stuff (e.g. Steves PFactor-function). Here is another approach of mine: try to detect if Symbol() is XAU (GOLD) or any other "2 decimal places pair", used for MaxSpread detection (multiplier = 10 does not work, it must be 100), find the symbolname is not possible, because it may vary so, e.g. if mode_spread = 5 and (ask-bid) = 0.5 the functions returns "2", so we have 2 decimal places behind the comma. It just looks at which place after the comma the integer value from mode_spread appears. Code: Select all |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|