HI
I am using Portfolio trader for a strategy:
Orders were executed for a % trailing stop using GeneratePercentTrailing statement correctly and the position was closed. I exited out of portfolio trader and had to restart my machine, once i restarted Portfolio trader, the position history is still open and it shows as if the trade never executed. This is very odd. I have turned on Bar Magnifier by the minute, but it still doesn't show the closed position. I tried the same strategy in multicharts.net chart window with bar magnifier and got the same result. The order was correctly created and executed and I am using 4hr charts
Attached is the word document with the execution detail at the broker and the strategy. Please review and help
Automated Trading Issue
- Svetlana MultiCharts
- Posts: 645
- Joined: 19 Oct 2017
- Has thanked: 3 times
- Been thanked: 163 times
Re: Automated Trading Issue
Hello, lordsriram,
The signal performed different calculations during auto trading on real time data and after the restart on historical data. The orders are generated in accordance with the logic of a signal script in both cases. MultiCharts doesn't log user's signal calculation. Please compare the conditions of order generation to find out why the strategy decided to place an order (or not to place) in a particular case.
You can add traces in your code to clearly see the values that the script operates with.
A general example is available in our wiki:
https://www.multicharts.com/trading-sof ... Commentary
In this article you can find just the examples. Only the script writer knows which values shall be traced in the code to analyze its operation.
The signal performed different calculations during auto trading on real time data and after the restart on historical data. The orders are generated in accordance with the logic of a signal script in both cases. MultiCharts doesn't log user's signal calculation. Please compare the conditions of order generation to find out why the strategy decided to place an order (or not to place) in a particular case.
You can add traces in your code to clearly see the values that the script operates with.
A general example is available in our wiki:
https://www.multicharts.com/trading-sof ... Commentary
In this article you can find just the examples. Only the script writer knows which values shall be traced in the code to analyze its operation.