| || |
If there is no associated stop/limit order, the values of the Stop and Limit parameters in the Trades table are "0" and the values of the StopOrderID and LimitOrderID parameters are empty.
Originally Posted by AnkaSoftware
Looking forward to receiving it.
Will send the code sample to reproduce the problem shortly
You can use the method host:execute("getTradingProperty", conditionalDistance*,...) to get the minimal allowed distance between the market rate and the rate of the order. Besides, to avoid the error, use wider distance on the volatile market, for example when news comes.
b) Error "The Entry,Stop or Limit price you are entering is incorrect .. "
I am using Stop Order for an existing position with the Rate specified and TrailUpdatePips set to 1. Any way to suppress the errors/warning and not to let Strategy to stop?
Is there any Lua API command to find out that the strategy is running in backtester? I need this because commands like core.host:execute("extendHistory", 1, BidSource, from, 0); are not supported in back tester
There is no such a command. I would recommend you to add the custom parameter to your strategy, something like "Use extend history" (Yes/No), and set it to No for backtesting.
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. The possibility exists that you could sustain a loss in excess to your investment and therefore you should not invest money that you cannot afford to lose. Before deciding to trade foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. 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. FXCM 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.