NexusFi: Find Your Edge


Home Menu

 





Sierra Chart ACSIL for Beginners.


Discussion in Sierra Chart

Updated
      Top Posters
    1. looks_one Trembling Hand with 29 posts (186 thanks)
    2. looks_two mosalem2003 with 7 posts (0 thanks)
    3. looks_3 drunkcolonel with 4 posts (4 thanks)
    4. looks_4 Thegunshow with 2 posts (0 thanks)
    1. trending_up 34,395 views
    2. thumb_up 192 thanks given
    3. group 55 followers
    1. forum 55 posts
    2. attach_file 5 attachments




 
Search this Thread

Sierra Chart ACSIL for Beginners.

  #41 (permalink)
 
drunkcolonel's Avatar
 drunkcolonel 
Pluto is a planet
 
Experience: None
Platform: SierraChart
Trading: Freeze Dried Orange Juice
Posts: 44 since Jul 2011
Thanks Given: 161
Thanks Received: 48

Hi Trembling Hand! That worked.

For others one day who land on this who are attempting the same:

1. Following the excellent guide, I created a new project (DLL) with project name MySuperStudy
2. When I created the project the default files were

- /Header Files/framework.h
- /Header Files/pch.h
- /Source Files/dllmain.cpp
- /Source Files/pch.cpp

So, essentially the wizard did not create a default project-named header/cpp file. I did what you suggested, I literally just replaced the content of dllmain.cpp with the study, and I didn't have any problems compiling. I then renamed the dllmain.cpp to MySuperStudy.cpp and added a header as well MySuperStudy.h and was able to get that all working. Just trying to get the hello world working parts up and running.

To go further: I then went back on to sierra. Yet another night of reading docs. My next steps are to be able to debug. I'm putting my notes here to help fellow friends who want to do the same.

This was where I started
https://www.sierrachart.com/index.php?page=doc/AdvancedCustomStudyInterfaceAndLanguage.php #BuildingLocallyToDebug

This was important: Use the visual studio installer to Modify the installation to get the right compiler. MSVC v140
https://www.sierrachart.com/SupportBoard.php?ThreadID=63569

After that:
https://www.sierrachart.com/index.php?page=doc/StepByStepACSILDebugging.php

Seems to be respecting my breakpoints, so I'm calling it a win for tonight. I'm sure something will probably stump me down the road but your thread here was absolutely awesome, it helped so much.
Thanks Trembling Hand!
cppnew

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
How to apply profiles
Traders Hideout
NexusFi Journal Challenge - May 2024
Feedback and Announcements
ZombieSqueeze
Platforms and Indicators
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
39 thanks
Just another trading journal: PA, Wyckoff & Trends
30 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
21 thanks
  #42 (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


drunkcolonel View Post
So, essentially the wizard did not create a default project-named header/cpp file. I did what you suggested, I literally just replaced the content of dllmain.cpp with the study, and I didn't have any problems compiling. I then renamed the dllmain.cpp to MySuperStudy.cpp and added a header as well MySuperStudy.h and was able to get that all working. Just trying to get the hello world working parts up and running.

There is no need for a header

Follow me on Twitter Started this thread Reply With Quote
  #43 (permalink)
 
drunkcolonel's Avatar
 drunkcolonel 
Pluto is a planet
 
Experience: None
Platform: SierraChart
Trading: Freeze Dried Orange Juice
Posts: 44 since Jul 2011
Thanks Given: 161
Thanks Received: 48


agreed, no need for a header in the base example, but where im headed ... ill need one

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #44 (permalink)
metph
Luxembourg
 
Posts: 1 since Apr 2020
Thanks Given: 0
Thanks Received: 0

Hi all,

Is there a way to replicate a command-line order entry like in TradeStation in SC with ACSIL? I'd like to find a more efficient way to enter precise bracket orders in SC other than entering price, stop/target, qty all manually or saving a configuration file for each stop size

I cannot post links here yet but a Google search of "Tradestation Command line .PlaceOrder Advanced Parameter" will land on the page that describes exactly what i am looking for.

Thank you !

Cheers

Reply With Quote
  #45 (permalink)
ron88
Cary, North Carolina
 
Posts: 2 since May 2015
Thanks Given: 1
Thanks Received: 0

Hi Trembling Hand,

Could you advise me on how to code a Parabolic to a Moving Average ...
screencast.com/t/KL87IWYn

I have this code for my moving average:

 
Code
sc.MovingAverage(
	sc.BaseDataIn[SC_LAST],
	RL_10,
	MOVAVGTYPE_LINEARREGRESSION,
	RL_10Period.GetInt());
I am trying to modify the standard sc.Parabolic function:

 
Code
sc.Parabolic(
	sc.BaseDataIn, .........................RL_10
	sc.BaseDateTimeIn,
	Subgraph_Parabolic,.................RL10_Parabolic,
	sc.Index,
	Input_StartAccelerationFactor.GetFloat(),
	Input_AccelerationIncrement.GetFloat(),
	Input_MaxAccelerationFactor.GetFloat(),
	Input_AdjustForGap.GetYesNo(),
	Input_InputDataHigh.GetInputDataIndex(), ............?
	Input_InputDataLow.GetInputDataIndex() ............?
	);
I have tried every possible combination but cannot get it to replicate what happens on the chart.

Could you please help me with this?

Ron

Attached Thumbnails
Click image for larger version

Name:	Chart Setup.jpg
Views:	135
Size:	359.8 KB
ID:	321074  
Reply With Quote
  #46 (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


ron88 View Post
Hi Trembling Hand,

Could you advise me on how to code a Parabolic to a Moving Average ...
screencast.com/t/KL87IWYn

I have this code for my moving average:

sc.MovingAverage(
sc.BaseDataIn[SC_LAST],
RL_10,
MOVAVGTYPE_LINEARREGRESSION,
RL_10Period.GetInt());

I am trying to modify the standard sc.Parabolic function:

sc.Parabolic(
sc.BaseDataIn, .........................RL_10
sc.BaseDateTimeIn,
Subgraph_Parabolic,.................RL10_Parabolic,
sc.Index,
Input_StartAccelerationFactor.GetFloat(),
Input_AccelerationIncrement.GetFloat(),
Input_MaxAccelerationFactor.GetFloat(),
Input_AdjustForGap.GetYesNo(),
Input_InputDataHigh.GetInputDataIndex(), ............?
Input_InputDataLow.GetInputDataIndex() ............?
);

I have tried every possible combination but cannot get it to replicate what happens on the chart.

Could you please help me with this?

Ron

Thats somewhat of a mess of a screen dump. Happy to help but don't want to spend hours trying to replicate what you are trying to achieve to then just start to debug and more than likely not even using the same setup/code as you.
Can you maybe start a new thread and paste ALL code so I have a full working example and don't have to guess as what you are working with and trying to do.

Follow me on Twitter Started this thread Reply With Quote
  #47 (permalink)
ron88
Cary, North Carolina
 
Posts: 2 since May 2015
Thanks Given: 1
Thanks Received: 0

Thanks Trembling Hand,

Code is as follows:
 
Code
#include "sierrachart.h"

SCDLLName("PSAR_MA")

SCSFExport scsf_PSAR(SCStudyInterfaceRef sc)
{
	// SCSubgraphRef Subgraph_Parabolic = sc.Subgraph[0];
	SCSubgraphRef RL10_Parabolic = sc.Subgraph[1];
	SCSubgraphRef RL_10 = sc.Subgraph[2];
	
	SCInputRef Input_InputDataHigh = sc.Input[0];
	SCInputRef Input_InputDataLow = sc.Input[1];
	
	SCInputRef Input_StartAccelerationFactor = sc.Input[2];
	SCInputRef Input_AccelerationIncrement = sc.Input[3];
	SCInputRef Input_MaxAccelerationFactor = sc.Input[4];
	SCInputRef Input_AdjustForGap = sc.Input[5];

	SCInputRef RL_10Period = sc.Input[6];
	
	if (sc.SetDefaults)
	{
		// Set the sub-graph configuration and defaults
		
		sc.GraphName = "PSAR";
		
		sc.StudyDescription = "Parabolic Stop and Reverse applied to a MA not price";
		sc.DrawZeros = false;
		sc.GraphRegion = 0;
		sc.ValueFormat = VALUEFORMAT_INHERITED;
		
		sc.AutoLoop = 1;
/*		
		Subgraph_Parabolic.Name = "Parabolic";
		Subgraph_Parabolic.DrawStyle = DRAWSTYLE_POINT;
		Subgraph_Parabolic.LineWidth = 3;
		Subgraph_Parabolic.PrimaryColor = RGB(0,0,0);
*/
		RL10_Parabolic.Name = "RL10 Parabolic";
		RL10_Parabolic.DrawStyle = DRAWSTYLE_POINT;
		RL10_Parabolic.LineWidth = 3;
		RL10_Parabolic.PrimaryColor = RGB(0,0,255);
		
		Input_InputDataHigh.Name = "Input Data High";
		Input_InputDataHigh.SetInputDataIndex(SC_HIGH);

		Input_InputDataLow.Name = "Input Data Low";
		Input_InputDataLow.SetInputDataIndex(SC_LOW);

		Input_StartAccelerationFactor.Name = "Start Acceleration Factor";
		Input_StartAccelerationFactor.SetFloat(0.02f);
		Input_StartAccelerationFactor.SetFloatLimits(0.000001f,(float)MAX_STUDY_LENGTH);
		
		Input_AccelerationIncrement.Name = "Acceleration Increment";
		Input_AccelerationIncrement.SetFloat(0.12f);
		Input_AccelerationIncrement.SetFloatLimits(0.00001f, 100.0f);
		
		Input_MaxAccelerationFactor.Name = "Max Acceleration Factor";
		Input_MaxAccelerationFactor.SetFloat(0.2f);
		Input_MaxAccelerationFactor.SetFloatLimits(0.000001f,(float)MAX_STUDY_LENGTH);
		
		Input_AdjustForGap.Name = "Adjust for Gap";
		Input_AdjustForGap.SetYesNo(0);  // No
		
		RL_10Period.Name = "RL10 Period";
		RL_10Period.SetInt(10);		
	
		return;
	}
	
	
	// Calculate RL MA
	
	sc.DataStartIndex =  1 ;
	
	    sc.MovingAverage(
			sc.BaseDataIn[SC_LAST],
			RL_10,
			MOVAVGTYPE_LINEARREGRESSION,
			RL_10Period.GetInt());
			
///// Parabolic applied to a moving average as per Chart Setup.JPG

		sc.Parabolic(
			RL_10,
			sc.BaseDateTimeIn,
			RL10_Parabolic,
			sc.Index,
			Input_StartAccelerationFactor.GetFloat(),
			Input_AccelerationIncrement.GetFloat(),
			Input_MaxAccelerationFactor.GetFloat(),
			Input_AdjustForGap.GetYesNo(),
			Input_InputDataHigh.GetInputDataIndex(),
			Input_InputDataLow.GetInputDataIndex()
		);
		

}
 
Code
 */////////////////////////// Standard Sierra Chart Parabolic code as an example
		sc.Parabolic(
			sc.BaseDataIn,
			sc.BaseDateTimeIn,
			Subgraph_Parabolic,
			sc.Index,
			Input_StartAccelerationFactor.GetFloat(),
			Input_AccelerationIncrement.GetFloat(),
			Input_MaxAccelerationFactor.GetFloat(),
			Input_AdjustForGap.GetYesNo(),
			Input_InputDataHigh.GetInputDataIndex(),
			Input_InputDataLow.GetInputDataIndex()
		);
/*/////////////////////////// Standard Sierra Chart Parabolic code as an example
Attached also is the CHT file showing it working with standard studies as show in <Chart Setup.JPG>.

Thank you.

Attached Files
Elite Membership required to download: PSAR_RL10.Cht
Reply With Quote
  #48 (permalink)
rebeccas
LA, CA
 
Posts: 2 since May 2022
Thanks Given: 0
Thanks Received: 0

Hi Trembling Hand,
I've read through the Sierra Chart ACSIL for Beginners thread you created. Thanks for this.

I'm still not fully across how to set all of this, and for what I'm trying to do, I think it might be overkill.

Basically, all I want to do is export TPO/MP data into a spreadsheet.

From the Sierra Chart support forums, it looks like I need to use the sc.GetStudyProfileInformation function.

Is this correct and is there a simple way for me to export key values such as TPOC, VPOC, VVAH, VVAL, TVAL, TVAL, Range, High, Low, etc., to a spreadsheet?

Thanks for your help

Reply With Quote
  #49 (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


rebeccas View Post
Hi Trembling Hand,
I've read through the Sierra Chart ACSIL for Beginners thread you created. Thanks for this.

I'm still not fully across how to set all of this, and for what I'm trying to do, I think it might be overkill.

Basically, all I want to do is export TPO/MP data into a spreadsheet.

From the Sierra Chart support forums, it looks like I need to use the sc.GetStudyProfileInformation function.

Is this correct and is there a simple way for me to export key values such as TPOC, VPOC, VVAH, VVAL, TVAL, TVAL, Range, High, Low, etc., to a spreadsheet?

Thanks for your help

not sure what you are trying to do but I think this is all you need,

https://www.sierrachart.com/index.php?page=doc/StudiesReference.php&ID=379&Name=Write_Bar_and_Study_Data_To_File

Follow me on Twitter Started this thread Reply With Quote
  #50 (permalink)
rebeccas
LA, CA
 
Posts: 2 since May 2022
Thanks Given: 0
Thanks Received: 0



Trembling Hand View Post
not sure what you are trying to do but I think this is all you need,

Hi,
Thanks for the study link.

I tried this study. It works on regular charts but not on TPOs. The OHLC, Volume, Bid Volume and Ask Volume are exported, but not the POC, VPOC, VAH, VAL and other TPO values.

Any suggestions?

Thank you

Reply With Quote




Last Updated on August 8, 2023


© 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