Renko ACSIL? - futures io
futures io futures trading



Renko ACSIL?


Discussion in Sierra Chart

Updated by Amnesia
      Top Posters
    1. looks_one Amnesia with 9 posts (0 thanks)
    2. looks_two aslan with 4 posts (2 thanks)
    3. looks_3 vegasfoster with 2 posts (1 thanks)
    4. looks_4 cory with 1 posts (0 thanks)
    1. trending_up 3,143 views
    2. thumb_up 3 thanks given
    3. group 4 followers
    1. forum 16 replies
    2. attach_file 7 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Renko ACSIL?

(login for full post details)
  #1 (permalink)
Vienna Austria
 
 
Posts: 116 since Mar 2012
Thanks: 16 given, 67 received

So... I have been looking to automate something i am doing manually for higher timeframe charts. Which to be precise is to mark "zones" on higher timeframes after i see 3 consecutive bricks in one direction after a reversal renko bar.




The general idea can be understood and seen quickly from the attached chart. Whenever there is a reversal bar, if there are 3 bars moving in the same direction (including the reversal bar) i mark the lower end with an extending rectangle.
(Too be fair depending on the constellation, brick size etc sometimes i will only mark the tail/wick and sometimes the entire structure but for discussion purposes i chose to make the illustrated example rather simple).

Now the question remains is how do i implement this in the most efficient way in ACSIL? I have taken a look at the Autotrendline study Sierrachart has coded for some clues/ideas/references but it seems right now the most effective way would be to let a Loop run where every bar is compared with the previous bar and the next 3 following bar.



I.e It would compare bar at index X to the previous bar at X-1 if X's Close > X-1 Close then the first condition is met.
and then obviously (x+1 close > x close) and (x+2 Close > X+1 Close)

So if Conditions:
1) X Close > X-1 Close
2) X+1 Close > X Close
3) X+2 Close > X+1 Close

Are met then we would use the ACSIL reference code to draw an extending rectangle With the lower and upper line parameters of X-1 Close (lower rectangle line) and X Open (upper rectangle line).

Now the question is how would i most effectively implement this? Does anyone have tutorials or examples of ACSIL coded studied that do something similar? Because my biggest problem right now is the Indexing of the seperate bars.

I would appreciate insight/help into this from anybody.

Reply With Quote

Can you help answer these questions
from other members on futures io?
Using Built In Volume Profile in the Code
NinjaTrader
IB Bracker Order
Platforms and Indicators
MT4 Switch All Charts 1 click
Platforms and Indicators
T​​​​​​radestation datafeed (real time and historical) to NT8
NinjaTrader
Webinar: Linda Bradford Raschke Dealing with August burnout and Trader Camaraderie
The Elite Circle
 
 
(login for full post details)
  #3 (permalink)
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
 
cory's Avatar
 
Posts: 5,999 since Jun 2009
Thanks: 831 given, 7,833 received


so this method is long only?

Reply With Quote
 
(login for full post details)
  #4 (permalink)
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
 
Posts: 1,147 since Feb 2010
Thanks: 304 given, 838 received

I've never drawn tools in ascil before, so I would just draw two lines and fill them. The lines will be draw from the current index, but you want to go back, so I think you can create a custom index just for previous 3 bars and make two additional lines that are equal to the current lines. Never done it before though, so you will have to try it out, but I'm thinking something like:


 
Code
Line1[sc.Index] = desired formula;
Line2[sc.Index] = desired formula;

Int Index = sc.Index;

for(int i = 1; i<=3; i++)
{
Line3[Index-i] = Line1[sc.Index];
Line4[Index-i] = Line2[sc.Index];
}
The lines will overlap starting on the current index, but I don't think that will cause problems. If you don't want to use lines, then you will have to study up on the tools, cuz I can't help you there, and I'm sure there is a better way to do it if someone else wants to chime in.

Reply With Quote
 
(login for full post details)
  #5 (permalink)
Vienna Austria
 
 
Posts: 116 since Mar 2012
Thanks: 16 given, 67 received


cory View Post
so this method is long only?

@cory

Yes obviously you can inverse the conditions to get the opposite for shorts.

I have thought a little bit more about the implementation, i will need to read up on how ACSIL handles indexing and then i guess the only remaining issues are "overpainting" or adding too many rectangles as the loop continues/repeats itself from the base index and obviously how to make this more resource friendly and implement it.

I will write some Pseudocode for this entire thing and i guess try to implement it then ultimately =/

Anyone got pointers/suggestion on already existing code to look at or what to read?

Reply With Quote
 
(login for full post details)
  #6 (permalink)
Vienna Austria
 
 
Posts: 116 since Mar 2012
Thanks: 16 given, 67 received


vegasfoster View Post
I've never drawn tools in ascil before, so I would just draw two lines and fill them. The lines will be draw from the current index, but you want to go back, so I think you can create a custom index just for previous 3 bars and make two additional lines that are equal to the current lines. Never done it before though, so you will have to try it out, but I'm thinking something like:


 
Code
Line1[sc.Index] = desired formula;
Line2[sc.Index] = desired formula;

Int Index = sc.Index;

for(int i = 1; i<=3; i++)
{
Line3[Index-i] = Line1[sc.Index];
Line4[Index-i] = Line2[sc.Index];
}
The lines will overlap starting on the current index, but I don't think that will cause problems. If you don't want to use lines, then you will have to study up on the tools, cuz I can't help you there, and I'm sure there is a better way to do it if someone else wants to chime in.

@vegasfoster

Thanks for the idea, i understand what you are talking about now, will get to work coding then Thanks

Reply With Quote
 
(login for full post details)
  #7 (permalink)
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
 
Posts: 1,147 since Feb 2010
Thanks: 304 given, 838 received

Yeah, I would go with filled lines because then you won't be limited to the number of instances, whereas the tool will slow you down the more you add. I did this quickly as a proof of concept, need to flesh it out, but it seems to work ok.

Attached Files
Register to download File Type: cpp Test.cpp (1.1 KB, 23 views)
Reply With Quote
The following user says Thank You to vegasfoster for this post:
 
(login for full post details)
  #8 (permalink)
Madison, WI
 
Experience: Advanced
Platform: Sierra Charts, ALT
Trading: ES
 
aslan's Avatar
 
Posts: 616 since Jan 2010
Thanks: 351 given, 1,107 received

Vegas, If you do tools correctly, they should not be slowing you down.

Reply With Quote
 
(login for full post details)
  #9 (permalink)
Vienna Austria
 
 
Posts: 116 since Mar 2012
Thanks: 16 given, 67 received

@aslan

Yeah they shouldn't.

There are two things about the code i still don't understand yet:

1) "if (sc.Index > 5)"

This will essentially skip the first 6 bars, given that the currentbar is indexed at sc.index = 0,

Is this necessary? Cant we just start calculation from the first bar on given that the
 
Code
{
		
	bool Long = sc.Close[sc.Index-3] < sc.Close[sc.Index-4] && 
				sc.Close[sc.Index-2] > sc.Close[sc.Index-3] && 
				sc.Close[sc.Index-1] > sc.Close[sc.Index-2] && 
				sc.Close[sc.Index] > sc.Close[sc.Index-1];
	
	
	Plot1[sc.Index] = Long ? sc.Low[sc.Index-2] : Plot1[sc.Index-1];


Code calculates backwards anyways?

2)
 
Code
int Index = sc.Index;
	
	for(int i = 1; i<=2; i++)
	{
		Plot2[Index-i] = Plot1[sc.Index];		
	}
This loop, why does it simply count to two and thus sets the values of index-1 and index-2 i.e the two bars before the current indexed bars to the same value as the current indexed bars?

What is the point of this or why is this crucial/necessary for the code to work?

Reply With Quote
 
(login for full post details)
  #10 (permalink)
Madison, WI
 
Experience: Advanced
Platform: Sierra Charts, ALT
Trading: ES
 
aslan's Avatar
 
Posts: 616 since Jan 2010
Thanks: 351 given, 1,107 received


1. The index check is not technically needed, because SC will guard against accessing bad array indexes. However, it is good practice to not access values that do not exist, especially if they affect your overall logic moving forward (i.e. you do not want to generate bogus data that then feeds forward).

2. Vegas can explain his intent, but he is basically back propagating the values for the next calculation.

3. The assignment of sc.DataStartIndex really belongs in the SetDefaults block. (minor)

4. While I said that drawings would not slow you down, this code is a good example where I would not use them just because the code is so simple, and drawings would add some complexity. Only add them if you need to.

Reply With Quote


futures io Trading Community Platforms and Indicators Sierra Chart > Renko ACSIL?


June 25, 2013


Upcoming Webinars and Events
 

Dealing with burnout w/Linda Bradford Raschke

Elite only
     



Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts