Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 21:34:55 +0000



Prevent spreadsheet trading if there was already an order

View Count: 2260

[2013-11-21 17:43:05]
JordiE - Posts: 38
Hi, Support Team, good afternoon.

I have a problem on real Trading which is, sometimes, the automated system triggers more than one order in the same direction and at the same time, usually two orders with same defined size (as should be, according the Spreadsheet formulas). Even a time happened three orders at the sate time and same direction.
It do not happen on Backtesting, keeping in mind I'm usually backtest at x30 speed, while real trading is at real-time.

I'm trading Forex on FXCM by a FIX connection
My Spreadsheet_System_for_Trading Settings are as shown in the attached jpg
I've, in addition, tried to set J28 as: =IF(J42>=A3;TRUE;FALSE) as described by tomgilb here => Prevent spreadsheet trading if there was already an order in the present bar
But the problem remains.

Do you have any suggestion on solving this issue, please ?

Many thanks in advance
Best regards
Jordi
imageSpreadsheet_Study_For_Trading_Settings.JPG / V - Attached On 2013-11-21 17:36:38 UTC - Size: 62.77 KB - 528 views
[2013-11-21 19:43:16]
Sawtooth - Posts: 4120
With your settings, I wouldn't expect this to be happening. Are these multiple entries happening in the same bar? Do your price bars have a very short duration?

If you replay, at speed x1, the exact time period that this happens live, do the multiple entries also occur?

Try including $J$8<=0 in your K3 formula, and $J$8>=0 in your M3 formula.
[2013-11-21 19:58:58]
Sierra Chart Engineering - Posts: 104368
We can see this as a possible problem based upon your settings:.

Set this one to No:

Allow Entries With Working Orders

And then if there is still a problem, this one to No:

Cancel Working Orders on Entries and Reversals
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-11-21 20:06:46]
Sawtooth - Posts: 4120
Don't those options need to be Yes when Support Reversals is Yes, and you are using Attached Orders?
Date Time Of Last Edit: 2013-11-21 20:11:34
[2013-11-21 22:00:44]
Sierra Chart Engineering - Posts: 104368
Yes. One question is are they using Limit orders or Market orders for entry?
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-11-21 23:40:15]
JordiE - Posts: 38
Hi, thanks yolu for your answers, tomgilb and Support Team,

To your comments:

1) If you replay, at speed x1, the exact time period that this happens live, do the multiple entries also occur?
=> I did it, but it was just one shoot, with correct size. Keep in mind that the double shoot happens seldom, not always, just from time to time.

2) Try including $J$8<=0 in your K3 formula, and $J$8>=0 in your M3 formula.
=> Yes, I've included on both cells (With J$5) since long time ago.

3) Allow Entries With Working Orders - Set this one to NO
=> OK, Thanks SC. I now will try your suggestion. I'm thinking the problem should come with the feed-back figures coming from the market once filled the order (J5).
Let's see if it works. If not, I will try your next idea about setting "NO" on the "Cancel Working Orders on Entries and Reversals"

4) Yes. One question is are they using Limit orders or Market orders for entry?
=> I'm using Limit orders always for entries.
First I was used to Reverse any position and while trying to solve this problem, now I'm currently first exit the existing position and then I enter the new reverse position, if required.

5) Don't those options need to be Yes when Support Reversals is Yes, and you are using Attached Orders?
=> I'm NOT using Attached Orders

If you have any comments to my answers, I would very much appreciate them.
In the meanwhile, I've set "Allow Entries With Working Orders" to NO. Let's wait and see...

Thanks a lot for your help until now
Have a nice evening
Best regards
Jordi
[2013-11-26 22:08:24]
JordiE - Posts: 38
Hi Gents, good evening.

This afternoon I had again a double-enter like those described above, and after been turned to "NO" the
Allow Entries With Working Orders switch.
Now, I changed in additionto "NO" the Cancel Working Orders on Entries and Reversals switch as you suggested.
Let's wait and see again, if this solves the problem.

Again, thanks for your support.
Have a nice evening !
Best regards SC Support Team and tomgilb
Jordi
[2013-11-26 22:25:14]
Sierra Chart Engineering - Posts: 104368
Recent postings reviewed.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-11-27 12:16:14]
JordiE - Posts: 38
Hi, good morning,

Bad news for us, guys...

Again, it happened several times. (I'm attaching some pictures, made on the FXCM TradeStation for monitoring the trades)

For a detailed analisis, the complete system we're running is as follows:
1) One single PC 7core, and CPU running between 30% and 70%, (not so busy)
2) Seven SierraCharts engines running at the same time, independent and identical Automated Systems, one on each Forex PAIR
3) Each of the seven identic Automated System has 8 Charts with their corresponding SpreadSheets pages and one SpreadSheet-for-Alerts and one Spreadsheet-for-Trading
4) A hutch quantity of formulas and calculations on the Spreadsheets.
5) The seven SierraCharts Automated Systems trade on the same "primary" account at FXCM vía FIX connections.
6) A FXCM propietary software, (TradeCopier VPAMM),replicates all trades from the "primary" account (xxxx2002)to a "Main" account (xxxx2145), multiplying Size by four. (due to internal administrative reasons, we need to keep both accounts separated)
7) As long as we've seen, the problems on the double-trades occurs just on the "primary" account, that is, the one driven by the SierraCharts Automated Systems.
8) The observed problems are of two differente kinds:
a) What should be a single shot trade, results in two different possitions in the market (just on the "primary" account, but not in the "Main" one) with same correct Size each of them.
b) Sometimes, when a Reversal should take place (during this "debugging" time, we made the Systems first to flatten the existing position and then go into the new Reverse position), the existing position had not been flattened, thus keeping co-existing the previous (say e.j. Long one) position, the one which should Flatten it (say e.j. Short) and the new Reversed position (say e.j. Short one) all three with same correct Size and, for both Shorts, same Entry Time and aproximatly same Entry price, all said just in the "primary" account.
9) Finally, after the last change, switching to "NO" the Cancel Working Orders on Entries and Reversals yesrterday night, a new error has been observed in three different Pairs, which is, the correct Size should be 5 and, instead, in one pair it was 9, in another Pair it was 7,5 and in the third Pair it was 20.

I'm attaching the following Files:
1) Current SpreadSeet-For-Trading Settings
2) Two examples, showing incorrect trades on different Pairs.

Sorry for this very long explanation but, I guess, all the System Information should be considered when debugging these random problems/ trading errors.

I hope you can find some suggestions for us to follow.

Many thanks in advance, in the meanwhile.
Best regards
Jordi
image3x_CAD_on_Primary_EUR_7.5Size_GBP_9Size_SGD_20Size_on_primar.JPG / V - Attached On 2013-11-27 12:15:12 UTC - Size: 144.34 KB - 500 views
imageSpreadSheet_Settings_27112013.JPG / V - Attached On 2013-11-27 12:15:22 UTC - Size: 84.59 KB - 497 views
imageSGD_20_GBP_9_EUR_7_5_NZD_2B&1S.JPG / V - Attached On 2013-11-27 12:15:52 UTC - Size: 145.19 KB - 492 views
[2013-11-27 14:37:36]
JordiE - Posts: 38
Hi, again, it can be seen here what happened a while ago....

Another example about what has been said in my previous Post in Poin 8b)...

"b) Sometimes, when a Reversal should take place (during this "debugging" time, we made the Systems first to flatten the existing position and then go into the new Reverse position), the existing position had not been flattened, thus keeping co-existing the previous (say e.j. Long one) position, the one which should Flatten it (say e.j. Short) and the new Reversed position (say e.j. Short one) all three with same correct Size and, for both Shorts, same Entry Time and aproximatly same Entry price, all said just in the "primary" account."

Find attached a couple of pictures, and note the previous two Short positions USDNZD,(one on each account) entered on 27/11/2013 at 2:35 hs. and, in the next picture, how it remains just the Short position on the xxxx2002 "primary" account and there are two additional Buy positions with Entry Time 27/11/2013, 9:10 hs, on the xxx2002 "primary" account and one Buy Position also with same entry Time 27/11/2013, 9:10 hs on the xxxx2145.

It seems that the previous Short position on the xxx2145 Account has been succesfully reversed to a Buy position entered at 27/11/2013 9:10, BUT in the xxx2002 "primary" account, (driven by SierraChart) the existing previous Short position HAS NOT been Flattened, thus remaining both BUY positions (one to Flat the existing one and the second one to go into a new Buy position) entered at 27/11/2013, 9:10, plus the exiting Short one, entered at 27/11/2003, 2:35 hs.

Let me hear your comments, whenever you have them

As always, many thanks for your support
Best regards
Jordi
image3x_CAD_on_Primary_EUR_7.5Size_GBP_9Size_SGD_20Size_on_primar.JPG / V - Attached On 2013-11-27 14:35:59 UTC - Size: 144.34 KB - 528 views
image3x_NZDBuy_1xNZDSell.JPG / V - Attached On 2013-11-27 14:36:09 UTC - Size: 135.92 KB - 506 views
Attachment Deleted.
[2013-12-01 17:31:08]
JordiE - Posts: 38
Hi Support Team and tomgilb.

I hope your week-end was enjoyable !!

Regarding my previous Posts, a more accurate analysis about the "secondary" account xxx2145 revealed that there has been ALSO double-trades in it, as it was driven by the "primary" account xxxx2002 throught the FXCM TradeCopier Software.

This means that my previous sentence 7) WAS NOT true....
"7) As long as we've seen, the problems on the double-trades occurs just on the "primary" account, that is, the one driven by the SierraCharts Automated Systems".

The recent past week, as expected due to ThanksGiving was very quiet in the markets.

Have you had any new idea about the reason for the double-shot problem ? and any trick to solve it ?

As usual, many thanks in advance for your support and help.
Enjoy the starting week and Best regards
Jordi
[2013-12-01 19:15:15]
Sawtooth - Posts: 4120
The double entry is probably a programming and/or settings issue, but your system is too complex to debug without having the chartbook and spreadsheets.

Do you have autotrading spreadsheet studies on other charts of the same symbol?


[2013-12-01 22:04:31]
JordiE - Posts: 38
Hi tomgilb, thank you for coming back so quick.

Each Automated System for a Symbol, has 8 identical Range charts, except for the Range Value, all of them different.
And yes, in all eight Charts, there is one Autotrading Spreadsheet each, and Cell J28 on each Sheet is driven by a unique Cell at Sheet1!B4 with the following Formula: NOT(Sheet1!B4=3)(e.j. for Chart/Sheet3!.
In this way, just one Chart/Sheet at a time is the one responsible to send Orders to the market.
The value at Sheet1!B4 depends on the trend acceleration measured on each Chart.

From your comments, I went into a double-checking on that formulas, and found a problem on Sheet7!J28, where there was, since long time ago starting with the development, a different formula which kept Sheet7!J28 at FALSE status (it means "active to trade"), while the Sheet selected by Sheet1!B4 was another one. This fact could be a reasonable reason, as you mentioned, for double entries....Let's wait and see...

It had never happened, during several months backtesting, a double entrie but, maybe the reason could be the different delays between a local backtesting order and a real market order. What do you think about it ?

Thanks a lot tomgilb, your comments made me go for a double-check tonight..

Have a nice Monday !!
Best regards
Jordi
[2013-12-05 09:49:04]
Sierra Chart Engineering - Posts: 104368
We will look this over and get back to you.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-12-05 10:02:44]
JordiE - Posts: 38
Good morning and Thanks Support Team,

I'm starting to review completely once more the Trading Reports to find out any possible explanation and/or clarifying issue.
As soon as I can, I will also come back to you with my conclusions.


Best regards and thanks again
We keep on-line.
Jordi
[2013-12-05 12:11:08]
JordiE - Posts: 38
Hi, good morning again.

Herewith attached, find an official FXCM Trading Report excel sheet on the account traded through our SierraCharts Automated Systems.
I've created 5 additional columns labeled in BLACK & WHITE colours, in order to help with the analisis, together with painting trade-lines with colours, whenever both Tickets# for each trade are not consecutive in time, (following the alert "Attention" in new-column-B), thus meaning there was an abnormal situation because we intend to keep just-ONE-trade-at-any-time into the market for each symbol.

- The New-column-E, show the sense of any round-trade (Buy or Sell, SAME sense for both equal Ticket#)
- While the New-column-F show the action for each particular order (Buy or Sell, DIFFERENT sense for both equal Ticket#)
- New-columns_H_and_I help with the righ ordering of all lines to help with the analisys.

=> Current order: Symbol/Date/Time/Ticket#

Finally, as you can see, I did not an "exhaustive" analisys for all and each Symbol, but enough to show you what's going on.

Later-on, I will complete the same analisys on the "Slave account 6444012145" which is replicated from this one 6444012002 BUT, I'm afraid, the problems on it probably would be on FXCM side, as this account it's not "driven" by SierraCharts

So, that's all for this Post. I hope you can detect what's really happening and help with any idea to solve the situation.

As always, I thank you very much for your time and help
We keep in contact.
Have a nice day !
Jordi
attachmentAcc.6444012002_Analisis.xlsx - Attached On 2013-12-05 11:58:50 UTC - Size: 53.44 KB - 484 views
[2013-12-05 15:25:20]
JordiE - Posts: 38
Hi, it's me again. I hope you're fine.

FXCM Support, has just informed the problem could be because our FXCM Account 6444012002 traded through SierraCharts, had "hedging active" while, as far as I remember, I deactivated both when I opened them (the copied Account 6444012145 had, efectively, "hedging" deactivated as I supossed to be).
So, I've just deactivated Hedging on the 6444012002 and "cleaned" all non-normal existing open trades, to check from now on, if the situation goes to normal.

If this is the case then, most probably, I misinterpreted a "Double-Shot" from SierraCharts, to the fact to see both trades on the FXCM TradingStation screen. (the one to cancel the previous existing one and the one to entry the new position, plus the previous existing position not cancelled due to Hedging funcionality)

So please, don't use your time to analize our problem for a while, and wait for the results of turning-off Hedging. I'll keep you updated.

For the time being, lot of thanks to Support Team and also to tomgilb for your suggestions and time.

Best regards and have a nice evening...!
Jordi
[2013-12-06 11:18:27]
Sierra Chart Engineering - Posts: 104368
Hedging very well could be the problem here. Sounds like it.



Aside from hedging:
As long as you have Allow Entries With Working Orders set to No, you should not get more than one order. The only other thing that could possibly be a problem is that the state of the order goes to completed state before there is an order fill or position update from FXCM allowing a very short amount of time for another order to be submitted.

This would seem unlikely.

The other possibility is that the order is originating from another source other than Sierra Chart. We do not fully understand what exactly you are doing. There are a lot of details here and do not have time to concentrate on all of them, but we see there are other accounts being involved.

The Trade >> Trade Activity Log, will reveal each of these issues.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2013-12-12 20:30:12
[2013-12-06 12:21:09]
JordiE - Posts: 38
Thanks so much, Support Team,

For your commments, I'll keep them in mind.

The fact is that, whenever Hedging is enabled, and FXCM account allow two opposite positions co-exist in the market at the same time, after the first shot from SierraChart to Reverse the existing position, from SierraChart view, the Position Quantity at J5 or J8 will be Zero, thus enabling the next shot to fulfill the programmed algoritms which are saying "Go" !

Ok, let's wait for a while, and see what happen with all the seven Systems, one on each pair.
Since yesterday, there has been just one Entry (EURUSD) and it was correct.

Thanks again and I wish you a very nice week-end !
Cheers
Jordi
[2013-12-12 20:31:33]
Sierra Chart Engineering - Posts: 104368
the existing position had not been flattened, thus keeping co-existing the previous (say e.j. Long one) position, the one which should Flatten it (say e.j. Short) and the new Reversed position (say e.j. Short one) all three with same correct Size and, for both Shorts, same Entry Time and aproximatly same Entry price, all said just in the "primary" account.

For an issue like this, refer to the Trade >> Trade Activity Log to see what has happened with submitted orders that are not working as expected. Here is the documentation:
http://www.sierrachart.com/index.php?l=doc/doc_TradeActivityLog.php
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-12-13 13:27:30]
JordiE - Posts: 38
Hi SC Support Team,

Thank you very much for your additional information on the TradeActivityLog. I've reviewed it.
With the last notice about disabling the "Hedging" feature of our FXCM account traded by SierraCharts, it it's running fine, at least for all Entries since that moment until now.

I'd like to thank you very much to all of you, for your follow-up and advices.
Let's close this issue for the time beeing, unless any dissapointing notice.

Best regards, and wish you a Merry Christmas and a nice 2014 !
Kindly,
Jordi

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account