| -
Add parameter to reverse buy/sell
Hello
I am not a programmer at all. I have a strategy is designed to test a breakout of a particular time period and chart time frame that I specify in the parameters when starting the backtester.
I would like to add a parameter to the .lua file that will reverse the buy and the sell.
An example would be as it currently stands:
Buy GBPCHF at 1.9600
Stop at 1.94543
Take all profit at 1.97457
OR (OCO)
Sell GBPCHF at 1.94543
Stop at 1.9600
Take all profit at 1.93066
I would like to add a parameter that says something like "switch buy and sell"
When that happens the these orders will be placed instead
Buy GBPCHF at 1.94543
Stop at 1.93066
Take all profit at 1.9600
OR (OCO)
Sell GBPCHF at 1.9600
Stop at 1.97457
Take all profit at 1.94543
Could you please tell me what code I should put in the .lua file and where it should go?
Thank you very much for your help
Jason
-
Hi Jason!
Could you please tell me what code I should put in the .lua file and where it should go?
There is no some kind of universal parameter. It is different for each strategy. If you want we can add this parameter into your strategy, but we need your strategy code to do this. You can post it here or send on the following e-mail: support@gehtsoftusa.com
Best regards,
Ekaterina
-
Thank you Ekatarina
I don't feel comfortable posting or emailing to code. I had just wanted to know if there was a standard way of being able to do it. So I appreciate you being willing. 
Have a good day.
|
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
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.