I created a Strategy that uses several ATMs at the same time. Each ATM has 1 Stop1 and 1 Target1. When creating an ATM, these targets are set to a known large distance (for example, 1000 ticks), but then they are moved to the values specified in the Strategy settings.
Problem #1:
Sometimes the result of such a function:
bool check = s.AtmStrategyChangeStopTarget (0, newSL, "Stop1", atmStrategyId);
check is "True", but Stop1 does not move at all. It also does not respond to further calls to the s.AtmStrategyChangeStopTarget () function.
Question for problem #1:
What the reason of this problem?
Problem #2:
Periodically, after I clicked “Close” (peak1, label 1), the ATM order and its Target1 are closed / deleted, and Stop1 remains on the chart (pic1, label2). I cannot delete it manually, I cannot move it. Here's how it appears in the list of orders: pic2. There I also can’t delete it.
I found a way to delete such orders - this is Account Reset. But it seems to me that this is not the right way.
Question for problem #2:
I’m wondering what is the reason for such orders and why I can’t delete them in the standard way.
Comment