Login Page - Create Account

Support Board


Date/Time: Fri, 29 Mar 2024 15:34:03 +0000



[User Discussion] - Over executing

View Count: 888

[2015-02-21 01:04:09]
CustomIndicators - Posts: 126
I have an if statement that looks for a condition to be met, than executes a block of code intended to draw something on the chart. The if statement monitors already closed candles. When the test is true, I get a rush of all the same thing, when I only want it to do it once. I've set a part of the executed code block to add messages into the alerts, so I could see what was going on, and to see if the code block was executing in the first place. This is the result I got:

Chart: Replay 30.0X: AUDJPY 5 Sec #1 | Study: MyIndicator | Peak 1: 0.001690 | 2015-02-20 22:16:31
Chart: Replay 30.0X: AUDJPY 5 Sec #1 | Study: MyIndicator | Peak 1: 0.001690 | 2015-02-20 22:16:31
Chart: Replay 30.0X: AUDJPY 5 Sec #1 | Study: MyIndicator | Peak 1: 0.001690 | 2015-02-20 22:16:31
Chart: Replay 30.0X: AUDJPY 5 Sec #1 | Study: MyIndicator | Peak 1: 0.001690 | 2015-02-20 22:16:32
Chart: Replay 30.0X: AUDJPY 5 Sec #1 | Study: MyIndicator | Peak 1: 0.001690 | 2015-02-20 22:16:32
Chart: Replay 30.0X: AUDJPY 5 Sec #1 | Study: MyIndicator | Peak 1: 0.001690 | 2015-02-20 22:16:32
Chart: Replay 30.0X: AUDJPY 5 Sec #1 | Study: MyIndicator | Peak 1: 0.001690 | 2015-02-20 22:16:32
Chart: Replay 30.0X: AUDJPY 5 Sec #1 | Study: MyIndicator | Peak 1: 0.001690 | 2015-02-20 22:16:32


How can I fix it, and bring it down to just one entry per closed candle?
[2015-02-21 01:47:04]
Sierra Chart Engineering - Posts: 104368
Refer to:
http://www.sierrachart.com/index.php?page=doc/doc_ACSILTrading.html#AllowOnlyOneTradePerBar
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
[2015-02-21 05:45:20]
CustomIndicators - Posts: 126
Alright. That solves the automated trading part of this, but what about the processing? When a new bar closes, I'm getting that repeated execution. Is there a way to stop that as well, as to cut down on the processing?

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

Login

Login Page - Create Account