Hello
I read this topic viewtopic.php?f=1&t=10204&start=0
but it's still not clear to me how the whole thing works.
I want to trade one symbol on multiple charts. Strategies are similar, with slightly different parameters. They will produce similar orders at about the same time. What mode should I choose, SA or AA?
When using AA, if limit entry order is not filled, will strategy produce an exit order and send it to broker?
Can I use SA, disregard visual chart-broker position discrepancies on each chart and assume that all entry orders that are filled will be closed correctly?
Thanks.
Auto trading one symbol, multiple charts [SOLVED]
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Auto trading one symbol, multiple charts
Hello AAY,
It is up for you to decide. I always recommend SA.I want to trade one symbol on multiple charts. Strategies are similar, with slightly different parameters. They will produce similar orders at about the same time. What mode should I choose, SA or AA?
Strategy logic is not affected by switching the modes. It will work the way it is written. The difference in modes = different starting points of calculation + different visual results on chart.When using AA, if limit entry order is not filled, will strategy produce an exit order and send it to broker?
If you write your code correctly (using MarketPosition_at_Broker and MarketPosition_at_Broker_for_The_Strategy keywords), it will still be able to place orders according to actual position at broker, but in this case the strategy on chart will behave still individually, because chart position in auto-trading engine will be affected only by the orders generated from this exact chart.Can I use SA, disregard visual chart-broker position discrepancies on each chart and assume that all entry orders that are filled will be closed correctly?
Re: Auto trading one symbol, multiple charts
So, yes or no? Entry order was generated but not filled for some reason, will strategy produce an exit order and send it to broker?Strategy logic is not affected by switching the modes. It will work the way it is written. The difference in modes = different starting points of calculation + different visual results on chart.When using AA, if limit entry order is not filled, will strategy produce an exit order and send it to broker?
As I said, I don't care if broker position is different from the position on chart. I want to make sure that the trading engine can track individual positions opened from different trading strategies on different charts, and close them as needed. As I understand, it's possible, but I need to take special precautions using the keywords you mentioned?If you write your code correctly (using MarketPosition_at_Broker and MarketPosition_at_Broker_for_The_Strategy keywords), it will still be able to place orders according to actual position at broker, but in this case the strategy on chart will behave still individually, because chart position in auto-trading engine will be affected only by the orders generated from this exact chart.Can I use SA, disregard visual chart-broker position discrepancies on each chart and assume that all entry orders that are filled will be closed correctly?
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Auto trading one symbol, multiple charts [SOLVED]
Possible situation 1:So, yes or no? Entry order was generated but not filled for some reason, will strategy produce an exit order and send it to broker?
SA mode, chart A (visual) market position is +1, chart B (visual) market position is -1, strategy auto-trading engine A position is +1, strategy auto-trading engine B position is -1, broker market position is 0, in Orders and Positions Tracker the position match = "false" for both charts, orders will be generated based on auto-trading engine position;
Possible situation 2:
AA mode, chart A (visual) market position is +3, chart B (visual) market position is -2, strategy auto-trading engine A position is +1, strategy auto-trading engine B position is -1, broker market position is 0, in Orders and Positions Tracker the position match = "false" for both charts, orders will be generated based on auto-trading engine position;
Now, let's assume in your code you use "If marketposition_at_broker = ... then begin ...". It will ruin the whole logic, because your code sees market position at broker and according its logic it should generate an order, but auto-trading engine doesn't let it do som because it has a different position.
Do not use MarketPosition_at_Broker.As I said, I don't care if broker position is different from the position on chart. I want to make sure that the trading engine can track individual positions opened from different trading strategies on different charts, and close them as needed. As I understand, it's possible, but I need to take special precautions using the keywords you mentioned?
Re: Auto trading one symbol, multiple charts
AAY,
Please don't feel obligated, but if you have a moment, would you mind elaborating a bit for the benefit of the forum? I'd like to hear about your experiments and conclusion.
Please don't feel obligated, but if you have a moment, would you mind elaborating a bit for the benefit of the forum? I'd like to hear about your experiments and conclusion.
Re: Auto trading one symbol, multiple charts
My main concern was the ability of Multicharts to track the amount of open positions for the same instrument on different charts. Testing is far from complete, but at least I see that all open entries were closed correctly.
As I said, I trade many instances of similar strategies, with slightly different parameters. This set of strategies generates entry orders at prices close to each other, and at about the same time, within 5-minute window. This produces a lot of visual mess on charts, and it's hard to tell which order belongs to which strategy instance. But when it's time (or price) to close entries, all entries are closed correctly. This I what I tested so far.
I did not test network interruptions and other stuff like this.
I can describe my further experience with this later, when I will have been trading this in production for a month or two.
As I said, I trade many instances of similar strategies, with slightly different parameters. This set of strategies generates entry orders at prices close to each other, and at about the same time, within 5-minute window. This produces a lot of visual mess on charts, and it's hard to tell which order belongs to which strategy instance. But when it's time (or price) to close entries, all entries are closed correctly. This I what I tested so far.
I did not test network interruptions and other stuff like this.
I can describe my further experience with this later, when I will have been trading this in production for a month or two.