Renko ACSIL? - Sierra Chart Programming | futures io social day trading
futures io futures trading


Renko ACSIL?
Updated: Views / Replies:2,249 / 16
Created: by Amnesia Attachments:7

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 7  
 
Thread Tools Search this Thread
 

Renko ACSIL?

  #1 (permalink)
Trading for Fun
Vienna Austria
 
Futures Experience: Advanced
Platform: Sierra Chart
Favorite Futures: NQ, FGBL, 6E, GC
 
Posts: 116 since Mar 2012
Thanks: 16 given, 65 received

Renko ACSIL?

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.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).



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.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


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
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,220 since Jun 2009
Thanks: 628 given, 6,318 received
Forum Reputation: Legendary


so this method is long only?

Reply With Quote
 
  #4 (permalink)
Elite Member
las vegas
 
Futures Experience: Intermediate
Platform: Sierra Chart
Broker/Data: Velocity/IB
Favorite Futures: 6E
 
Posts: 1,147 since Feb 2010
Thanks: 304 given, 836 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
 
  #5 (permalink)
Trading for Fun
Vienna Austria
 
Futures Experience: Advanced
Platform: Sierra Chart
Favorite Futures: NQ, FGBL, 6E, GC
 
Posts: 116 since Mar 2012
Thanks: 16 given, 65 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
 
  #6 (permalink)
Trading for Fun
Vienna Austria
 
Futures Experience: Advanced
Platform: Sierra Chart
Favorite Futures: NQ, FGBL, 6E, GC
 
Posts: 116 since Mar 2012
Thanks: 16 given, 65 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
 
  #7 (permalink)
Elite Member
las vegas
 
Futures Experience: Intermediate
Platform: Sierra Chart
Broker/Data: Velocity/IB
Favorite Futures: 6E
 
Posts: 1,147 since Feb 2010
Thanks: 304 given, 836 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, 21 views)
Reply With Quote
The following user says Thank You to vegasfoster for this post:
 
  #8 (permalink)
Elite Member
Madison, WI
 
Futures Experience: Advanced
Platform: Sierra Charts, ALT
Favorite Futures: ES
 
aslan's Avatar
 
Posts: 614 since Jan 2010
Thanks: 342 given, 1,077 received

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

Reply With Quote
 
  #9 (permalink)
Trading for Fun
Vienna Austria
 
Futures Experience: Advanced
Platform: Sierra Chart
Favorite Futures: NQ, FGBL, 6E, GC
 
Posts: 116 since Mar 2012
Thanks: 16 given, 65 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];
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


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
 
  #10 (permalink)
Elite Member
Madison, WI
 
Futures Experience: Advanced
Platform: Sierra Charts, ALT
Favorite Futures: ES
 
aslan's Avatar
 
Posts: 614 since Jan 2010
Thanks: 342 given, 1,077 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

Reply



futures io > > > > > Renko ACSIL?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Instructional videos about ACSIL with Visual studio and other ACSIL programming t yonatan Sierra Chart Programming 2 January 29th, 2013 03:34 PM
ACSIL: Execute only On Removal of a Study yonatan Sierra Chart Programming 3 November 5th, 2012 12:52 PM
Need help - TSI - Function in ACSIL ejtrader Sierra Chart Programming 1 September 11th, 2012 10:07 PM
Need help - ACSIL - related questions ejtrader Sierra Chart Programming 2 August 30th, 2012 11:35 AM
Webinar - ACSIL with Visual Studio yonatan Sierra Chart Programming 1 August 16th, 2012 06:05 AM


All times are GMT -4. The time now is 06:24 AM.

Copyright © 2017 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
Page generated 2017-12-17 in 0.13 seconds with 20 queries on phoenix via your IP 54.82.81.154