Login Page - Create Account

Support Board


Date/Time: Wed, 15 Jan 2025 10:21:32 +0000



study is called in an endless manner

View Count: 1602

[2017-06-06 00:46:32]
jizzary - Posts: 177
Hi

i'm facing a very weired phenomena - the study is called in an endless manner

the problem started after my study started making calls to CQG (my feed is : CQG WebAPI)
to create positions (prior to that th eproblem never took place)

have any idea what i should look for ?

tnx
[2017-06-06 02:09:44]
Sierra Chart Engineering - Posts: 104368
A study instance will get called anytime there any type of order activity for the symbol of the chart.


Refer to:
https://www.sierrachart.com/index.php?page=doc/ACS_ArraysAndLooping.html#WhenFunctionCalled
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
[2017-06-06 10:08:00]
jizzary - Posts: 177
I was not precise enough ....

recalling the study function every interval/when candle is closed is defenitely
understood and expected

what i meant is when the study emits an order toward the trading server (CQG in my case)
then the study is called to perform a full recalc endlessly as if the study has just
added to the chart ...

this phenomenon was not seen before (before emitting orders and even not when emitting ones
in simulated mode)

pls notice that this phenomenon takes place (in addition to the above) when i switch to/out of
simulation mode (Trade=>Trade Simulation Mode On) ONLY when Trade-Windows-For-Chart is open


i'm using version 1554

if you can direct me what to look for that will be great assistance

if you need my code i can add the relevant snippets to this session

pls advise ... tnx
Date Time Of Last Edit: 2017-06-06 17:33:26
[2017-06-06 17:32:21]
Sierra Chart Engineering - Posts: 104368
Refer to help topic 30.9:
http://www.sierrachart.com/index.php?page=doc/helpdetails30.html#h30.9

Most likely what is described is the problem.
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: 2017-06-06 17:32:39
[2017-06-06 17:37:25]
jizzary - Posts: 177
not relevant - my study doesn't refer any other charts
it refers only resources on the same chart it runs

pls refer to my report


pls notice that this phenomenon takes place (in addition to the above) when i switch to/out of
simulation mode (Trade=>Trade Simulation Mode On) ONLY when Trade-Windows-For-Chart is open


it looks like there is an internal problem/bug in the platform.

all the problems i'm facing saterted when i started using Trade=>Open-Trade-Windows-For-Chart

awaiting yr assistance

tnx
Date Time Of Last Edit: 2017-06-06 17:37:45
[2017-06-06 17:57:23]
Sierra Chart Engineering - Posts: 104368
There definitely is no bug. But you do not have to believe us. At this point if you want us to look into it, it is going to have to be chargeable. But we really do not have time to get involved in this anyway.

You really have to debug the problem yourself. The procedure is to start with a single chart without any studies, and then add your custom study which contains no code and gradually add the code in little by little to see where the problem is.
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
[2017-06-06 19:34:17]
jizzary - Posts: 177
i'm testing my code and will let you know tomorrow ... so far it works great

looks weired (at priciple level) that you are expecting a customer to pay you
for fixing a problem in your code ?

i thought you should thank me for finding such problems (in case there are ones)

it is defenitely surprising. I appreciate the work you do and expect you to respect
me as yr customer rather than looking at me as one who bothers you
Date Time Of Last Edit: 2017-06-06 19:35:11
[2017-06-06 19:49:37]
Sierra Chart Engineering - Posts: 104368

looks weired (at priciple level) that you are expecting a customer to pay you
for fixing a problem in your code ?
The problem is on your side. It is really quite ridiculous if you think we are going to be debugging your code. Do you know how difficult and costly that is and how much time that takes of ours and how detrimental it is to the user base because it takes time away from development which benefits the user base. It is your responsibility to debug your own code.

me as yr customer rather than looking at me as one who bothers you
Yes you are a bother. Before you post here on the board you need to do an awful lot of research and testing and thinking on your side before you start claiming some kind of problem.
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: 2017-06-07 01:08:33
[2017-06-06 20:05:09]
jizzary - Posts: 177
you are not following

I'm not expecting you to debig my code

at this point i have an EMPTY study showing yr bug
you just have to read and understand the problem ... it is your bug
[2017-06-06 20:15:58]
Sierra Chart Engineering - Posts: 104368
We know that we cannot trust what users tell us.

the study is called in an endless manner
How do you come to this conclusion? And what studies are on the chart?
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
[2017-06-06 20:27:43]
jizzary - Posts: 177
are you joking w/ me ? is this a serious attitude ?

what is wrong w/ telling you what i see ?

in 10-15 minutes i will provide you a report that will guide you to see yr bug

tnx

p.s. take into account that i'm not a regular user ... i'm a senior software designer/developer
obviously i don't know yr system details buy i have the background and probabely more than background
to understand where problem may be found

pls do not reply as it wipes my text (i already wrote a report and yr last response wiped that text). tnx
[2017-06-06 20:55:29]
jizzary - Posts: 177
i have an EMPTY study

it is being called every interval as

  sc.UpdateAlways = 1;


out of SetDefaults block it does nothing excpet the following print

  logMsg.Format("[Study Body Called %d]", sc.Index);
  sc.AddMessageToLog(logMsg, LOG_WIN_CLOSE);
  return;


the regular print at the log window on the go looks as follows (pls notice the numeric value of sc.Index)
as expected after scanning the historical bars it shows few times the real time bars
where sc.Index stays the same until the bar is closed

Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 0] | 2017-06-06 16:13:42
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 1] | 2017-06-06 16:13:42
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2] | 2017-06-06 16:13:42
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 3] | 2017-06-06 16:13:42
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 4] | 2017-06-06 16:13:42
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 5] | 2017-06-06 16:13:42
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 6] | 2017-06-06 16:13:42

.
.
.
.
.
.

Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:32
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:33
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:33
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:34
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:34
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:35
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:35
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:36
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:36
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:37
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:37
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:38
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:38


so far so good

now ... pls go to Trade menu and do as follows:

1. Open Trade Window For Chart

then

2. switch to simulation mode (Trade Simulation Mode On menu entry)

the print at the log window will now roll and become zero which means that my study has been restarted

Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:36
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:37
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:37
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:38
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:38
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 0] | 2017-06-06 16:14:39
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 1] | 2017-06-06 16:14:39
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2] | 2017-06-06 16:14:39
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 3] | 2017-06-06 16:14:39
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 4] | 2017-06-06 16:14:39
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 5] | 2017-06-06 16:14:39
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 6] | 2017-06-06 16:14:39
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 7] | 2017-06-06 16:14:39
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 8] | 2017-06-06 16:14:39
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 9] | 2017-06-06 16:14:39
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 10] | 2017-06-06 16:14:39
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 11] | 2017-06-06 16:14:39
.
.
.
.
.
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:46
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:46
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:47
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:47
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:48
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:48
Chart: F.US.CLEN17/F.US.CLEN17 [C] Renko 13t #3 | Study: FUTURES | [Study Body Called 2353] | 2017-06-06 16:14:49


after we will agree that this is YOUR bug
i will explain what MAY BE the reason for endless restart of the study function


in case you still think the problem is w/ my code i'm open to study and recheck my code
and you have to keep in mind that there is actually no code - it is an empty study
Date Time Of Last Edit: 2017-06-06 21:06:41
[2017-06-06 23:57:55]
jizzary - Posts: 177
i see that the same problem occurs when i add a new study (e.g. Moving Average) to the chart

this event causes the a study recaculation
[2017-06-07 19:21:09]
Sierra Chart Engineering - Posts: 104368
First of all, you are not being honest with us. You are saying your study is being called endlessly, but then later you say you are using
sc.UpdateAlways = 1;. So you are already intentionally misleading us.


When you are enabling and disabling Trade Simulation Mode, and the chart is maintaining a trade list which would be the case when in it is in Chart Trade Mode, then the chart will be fully recalculated because the trade list has to be rebuilt and certain studies have to be aware of that change and recalculated.

i see that the same problem occurs when i add a new study (e.g. Moving Average) to the chart
This is normal and is documented.

This is all documented here:
https://www.sierrachart.com/index.php?page=doc/ACS_ArraysAndLooping.html#WhenFunctionCalled
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: 2017-06-07 19:21:56
[2017-06-07 19:29:19]
Sierra Chart Engineering - Posts: 104368
Also the documentation linked to above, has been updated. It is more clear and covers some other scenarios.
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
[2017-06-07 22:23:02]
jizzary - Posts: 177
tnx for yr response ... i haven't read it yet to its last line

i read the first lines and MUST make clear as for the following

>> First of all, you are not being honest with us.
you should avoid writing these words to me. this can never take place
i may not understand something but NEVER NEVER will not be dishonest


You are saying your study is being called endlessly, but then later you say you are using
sc.UpdateAlways = 1;. So you are already intentionally misleading us.


i'm afraid you didn't understand me.

of course the study is being called every interval but this is NOT my complain
what i have complained is that my study is restarted again and again and the report shows it

i'll stop here ... i will read yr answer to the end tomorrow (after midnight here)
and hope it will assit me overcome the problem i'm facing

just wanted to clean the table - as it concerns me - misleading and dishonesty are irrelevant

again ... tnx for yr work and support. appreciated !
Date Time Of Last Edit: 2017-06-08 15:05:56
[2017-06-09 02:01:07]
Sierra Chart Engineering - Posts: 104368
The only thing you can do is use manual looping and just ignore the full recalculation event by ignoring the sc.UpdateStartIndex value and just doing the necessary calculations you need to do only.

But this does not happen again and again. It only happens under certain conditions.
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
[2017-06-09 21:10:13]
jizzary - Posts: 177
i need to update you that the whole problem that restarted endlessly
the study function came from wrong usage of the SCSring object
(something has probably severly damaged and made things go crazy)

after correcting the problem - every thing is working great

tnx for yr support

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

Login

Login Page - Create Account