Login Page - Create Account

Support Board


Date/Time: Sat, 20 Apr 2024 13:21:15 +0000



Variable Declaration

View Count: 918

[2014-04-15 17:13:58]
Gary Lockwood - Posts: 16
New programmer here trying to figure out a basic question. I'm using the variable 'ready' to be a prereq to enter a trade and I'm trying to declare it in the if(SetDefaults) portion before using it. I have it also declared in my if statement that triggers it 'bool ready = true;'

I'm getting an error on my entry if statement:

error: 'ready' was not declared in this scope

Not sure how to fix this problem as I don't want to declare it where it will continually be turned to false from the autoloop (ie. I want to market to do something to trigger it true, then the market has to do something else before my entry triggers). Stumpted on this one.

Any help is appreciated, thank you.
[2014-04-16 06:04:02]
Sierra Chart Engineering - Posts: 104368
Look at using a persistent variable:
http://www.sierrachart.com/index.php?page=doc/doc_ACSIL_Members_Variables_And_Arrays.html#scPersistVars
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

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

Login

Login Page - Create Account