NexusFi: Find Your Edge


Home Menu

 





Questions and discussion for Sierra Chart ACSIL for Beginners


Discussion in Sierra Chart

Updated
      Top Posters
    1. looks_one Trembling Hand with 43 posts (35 thanks)
    2. looks_two mosalem2003 with 40 posts (0 thanks)
    3. looks_3 1m1k3 with 20 posts (0 thanks)
    4. looks_4 bradhouser with 6 posts (9 thanks)
      Best Posters
    1. looks_one bobwest with 3.5 thanks per post
    2. looks_two bradhouser with 1.5 thanks per post
    3. looks_3 TropicalTrader with 1 thanks per post
    4. looks_4 Trembling Hand with 0.8 thanks per post
    1. trending_up 28,231 views
    2. thumb_up 53 thanks given
    3. group 30 followers
    1. forum 119 posts
    2. attach_file 25 attachments




 
Search this Thread

Questions and discussion for Sierra Chart ACSIL for Beginners

  #91 (permalink)
1m1k3
Budapest, Hungary
 
Posts: 21 since Dec 2022
Thanks Given: 4
Thanks Received: 0


Trembling Hand View Post
Works for me in replay and I assume live too. Not on historical loading as the calculations are independent on loading.


Thx @Trembling Hand for had a look on my question but on your pic the RSI value of the left chart is different from the value shown in the message log window. My aim is to get the correct value for further calculations.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Quantum physics & Trading dynamics
The Elite Circle
Better Renko Gaps
The Elite Circle
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
What broker to use for trading palladium futures
Commodities
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
24 thanks
What is Markets Chat (markets.chat) real-time trading ro …
19 thanks
ApexTraderFunding.com experience and review
16 thanks
GFIs1 1 DAX trade per day journal
12 thanks
EG Indicators
11 thanks
  #92 (permalink)
1m1k3
Budapest, Hungary
 
Posts: 21 since Dec 2022
Thanks Given: 4
Thanks Received: 0

If it matters... I'd like to use this on the same instrument but different time frames. To evaluate higher time frame's values for lower time frame's dicision. The study I need the values from contains 3 subgraphs and of course sooner or later I'll need all of them

As you can see I try to get (only now other way around) the value of RSI from the 30sec chart. The study still runs on chart#4. The price graph value window' value differs from the message log.


Reply With Quote
  #93 (permalink)
azad2171
Bengaluru, India
 
Posts: 2 since Jan 2023
Thanks Given: 1
Thanks Received: 0



1m1k3 View Post
I found a solution for this in the Studies2.cpp

Hey @1m1k3,
I need the same thing.
Can you guide me how to get the index of an event occurring?

Where exactly is the solution in studies2.cpp?

Thanks.

Reply With Quote
  #94 (permalink)
1m1k3
Budapest, Hungary
 
Posts: 21 since Dec 2022
Thanks Given: 4
Thanks Received: 0


azad2171 View Post
Hey @1m1k3,
I need the same thing.
Can you guide me how to get the index of an event occurring?

Where exactly is the solution in studies2.cpp?

Thanks.

In the study called BarNumbering there are a few lines which do the counting of bars. You just have to amend here and there to fit into your study.

Reply With Quote
  #95 (permalink)
 Trembling Hand 
Melbourne, Land of Oz
 
Experience: Advanced
Platform: Sierra Chart, CQG
Broker: CQG
Trading: HSI
Posts: 246 since Jun 2011
Thanks Given: 28
Thanks Received: 360


azad2171 View Post
Where exactly is the solution in studies2.cpp?

The code for most of SC studies and trading systems are in C:\SierraChart\ACS_Source in .cpp files

That study is in Studies2.cpp around line 3757

Follow me on Twitter Started this thread Reply With Quote
Thanked by:
  #96 (permalink)
 Trembling Hand 
Melbourne, Land of Oz
 
Experience: Advanced
Platform: Sierra Chart, CQG
Broker: CQG
Trading: HSI
Posts: 246 since Jun 2011
Thanks Given: 28
Thanks Received: 360


DCMCG17 View Post
I have been looking around through threads on here, and Sierra, trying to get a start on building a little automated setup, so I can backtest without a pen and paper.

I haven't really seen anything like what I'm looking for. Most people are asking for what seems to be more data collection/combining studies, and things that are more complex.

I think it is rather simple, I just need pointed in the right direction. Not sure if the spreadsheets or ACSIL are what I'm after.

Entrance based on a figure given by an indicator: enter long when cross from above, enter short when cross from below. 3 contracts, limit. -7 stop all. Once it comes 4 ticks in favour, stop moves to -4. Target 1, +10 ticks, once hit, stop moves to break even. Target 2, +17. Once target 2 hit, the stop for the final contract becomes trailing at -6.

I am not afraid to spend some time trying to code this, in fact I would love to be able to say I put it together somewhat. But I need a template.. if anyone has seen something similar, please let me know.

Hi
In C:\SierraChart\ACS_Source folder there is a .cpp called TradingSystem.cpp and in that file around line 1494 there is already a coded trading system based on crossovers called "Trading System - Study Subgraph Crossover". You can use that as the base code.

Follow me on Twitter Started this thread Reply With Quote
  #97 (permalink)
1m1k3
Budapest, Hungary
 
Posts: 21 since Dec 2022
Thanks Given: 4
Thanks Received: 0

Hi everyone,

How is it possible that the loading time of the code on the

https://www.sierrachart.com/index.php?page=doc%2FACSILRefOtherTimeFrames.php&fbclid=IwAR2YD8AcZbYNvA2n6JLxZ-fLNI0cGtican4tj5FZFH6flR0D5DQwLWjXxXM page

is multiple of the Study/Price Overlay study. However they both do the same.

I wanted to build in that code into my study but with this attribute I have better to discard this idea.
Or is there a way to make it quicker?

Thx

Reply With Quote
  #98 (permalink)
bradhouser
Northern California where the girls are warm
 
Posts: 122 since Nov 2010
Thanks Given: 15
Thanks Received: 72


1m1k3 View Post
Hi everyone,

How is it possible that the loading time of the code on the

https://www.sierrachart.com/index.php?page=doc%2FACSILRefOtherTimeFrames.php&fbclid=IwAR2YD8AcZbYNvA2n6JLxZ-fLNI0cGtican4tj5FZFH6flR0D5DQwLWjXxXM page

is multiple of the Study/Price Overlay study. However they both do the same.

I wanted to build in that code into my study but with this attribute I have better to discard this idea.
Or is there a way to make it quicker?

Thx

The Study/Price Overlay Study is coded directly in C++, and the source code is not available. It appears using an ASCIL version of what is a similar function uses more CPU time.

Reply With Quote
Thanked by:
  #99 (permalink)
azad2171
Bengaluru, India
 
Posts: 2 since Jan 2023
Thanks Given: 1
Thanks Received: 0


Trembling Hand View Post
Please post any questions and problems or suggestions you have in this thread about my Sierra Chart ACSIL for Beginners to keep that thread reasonably concise and clean of tangents.

Thanks.


Hi everyone,
I am trying to write a custom function for some calculations but I need to input an array(scFloatArray) into the function.
Now the compiler is showing an error when I call this function and give this array as input. It seems that scArrays are different than normal arrays and hence this error.

Here is the function that I wrote:
 
Code
int barsSinceCross(float arr[], int occurence) {
	int bars = 0;
	int reps = 0;

	for (int i = sizeof(arr) - 1; i > 0; i--)
	{
		if (arr[i] == 0.0)
		{
			bars++;
		}
		else if (reps < occurence)
		{
			reps++;
		}
		else

		{
			break;
		}
	}
	return bars;
}
This is where my array is declared:
 
Code
SCFloatArrayRef Array_CrossUp    = sc.Subgraph[4].Arrays[4];
And here is the call to the function:

 
Code
barsSinceCrossUp = barsSinceCross(Array_CrossUp, 1);

The error shown by compiler:

Quoting 
no suitable conversion function from "c_ArrayWrapper<float>" to "float*" exists


Thanks.

Reply With Quote
  #100 (permalink)
 Trembling Hand 
Melbourne, Land of Oz
 
Experience: Advanced
Platform: Sierra Chart, CQG
Broker: CQG
Trading: HSI
Posts: 246 since Jun 2011
Thanks Given: 28
Thanks Received: 360



azad2171 View Post
The error shown by compiler:


Quoting 
no suitable conversion function from "c_ArrayWrapper<float>" to "float*" exists

Thanks.

The compiler is telling you whats wrong. Your function takes a C++ array but you are passing in a SCFloatArrayRef data structure. Change your function parameters to match what you are passing to it like,


 
Code
int barsSinceCross(SCFloatArrayRef  arr, int occurence) {
    int bars = 0;
    int reps = 0;

    for (int i = sizeof(arr) - 1; i > 0; i--)
    {
        if (arr[i] == 0.0)
        {
            bars++;
        }
        else if (reps < occurence)
        {
            reps++;
        }
        else

        {
            break;
        }
    }
    return bars;
}
EDIT oh but then you cannot index a SCFloatArrayRef like a C++ array so you will have to change the function to use SC methods by pass in the sc reference.
https://www.sierrachart.com/index.php?page=doc/ACSILProgrammingConcepts.html

Follow me on Twitter Started this thread Reply With Quote




Last Updated on April 23, 2024


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts