which will work fine on Forex, the + 0.0020 means 20 pips. But this is not ok for CFDs (also not for JPY) because a pip on SPX500 for example is not 0.0001. So, the problem was that the stops/limits were being place much too close to the price, and they would trigger immediately.
The "usual" method to convert from pips to price is to do this...
Which converts the pips to price using x10, is because Bars.Point is the value of a fractional pip (i.e. 0.00001 on EUR/USD for example).
This should change now work for your SPX500 CFD
However, unfortunately, this is not the end of the story, because most CFDs do not have factional pip pricing, e.g. UK100, and there doesn't seem any easy way to work around this other than having a lookup function which finds out if the conversion should be x10 or x1
If a stEA calculates/determines position-size/numlot according to say Balance and the account setting performs rollover (auto position reset, close/open) midnight/close of market - whatever the time that happens everyday.
If on a particular day a position is in the money such that position-size calculation/result would raise from say one to two; when rollover is performed is this change effected; do we see the new position change from one numlot to two numlots or would rollover never have anything to do with changing such things as position-size and is only concerned with rollover of position "as is" leaving all other factors constant?
Please note that we are no longer providing free coding request on this forum. All this kind of request are with the lowest priority. Please consult our programming service if you want a immediate response.
Whatever Data Range 100, 500, 1000 Bars Back I set SWE30 doesn't get me the required bars - see image attached, thereby by failing attachment of both Indicators and Strategy Advisors due to "Not enough series length." Kindly advise.
Disclaimer: Trading foreign exchange on margin carries a high level of risk, and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with foreign exchange trading, and seek advice from an independent financial advisor if you have any doubts. Any opinions, news, research, analyses, prices, or other information contained on this website is provided as general market commentary and does not constitute investment advice. Forex Capital Markets LLC. will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on such information.