Support Board
Date/Time: Sun, 22 Dec 2024 11:28:19 +0000
Post From: Over executing
[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? |