Dark Theme
Light Theme
Trading Articles
Article Categories
Article Tools
Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
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 for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
HA Indicator
Updated June 3, 2011
Top Posters
looks_one
arbitrage
with 2 posts (0 thanks)
looks_two
Supa65
with 1 posts (0 thanks)
looks_3
Big Mike
with 1 posts (0 thanks)
looks_4
HowardCohodas
with 1 posts (0 thanks)
trending_up
4,098 views
thumb_up
0 thanks given
group
3 followers
forum
3 posts
attach_file
0 attachments
HA Indicator
June 2nd, 2011, 12:13 PM
Denver
Posts: 3 since Jan 2011
Thanks Given: 0
Thanks Received: 1
Hello,
I was wondering if someone could help me with a heikin ashi bar for Openecry. I have looked all over this forum and other forums and haven't found the exact answer. I had tradestation and switched to Openecry and was able to make a HA through an easylanguage transfer from TS but it does not look exact. I know there will be differences but could someone take a look at the code and suggest any improvements or a new code completely.
Thanks,
Arbitrage
inputs: UpColor(green),DnColor(red);
vars: haClose(0),haOpen(0),haHigh(0),haLow(0),
color(0);
if BarNumber = 1 then
begin
haOpen = open;
haClose = (O+H+L+C)/4;
haHigh = MaxList( high, haOpen, haClose);
haLow = MinList( low, haOpen,haClose);
end;
if BarNumber > 1 then
begin
haClose = (O+H+L+C)/4;
haOpen = (haOpen [1] + haClose [1])/2 ;
haHigh = MaxList(High, haOpen, haClose) ;
haLow = MinList(Low, haOpen, haClose) ;
if haClose > haOpen then
color = UpColor
else
color = DnColor;
plotPB(haOpen,haClose,"heikin-ashi",color);
SetPlotWidth(1,1);
SetPlotColor(1,color);
end;
Can you help answer these questions from other members on NexusFi?
Best Threads (Most Thanked) in the last 7 days on NexusFi
June 2nd, 2011, 01:06 PM
Canton, OH
Experience: Advanced
Platform: ThinkOrSwim
Trading: Index Options Credit Spreads
Posts: 98 since Mar 2011
Thanks Given: 40
Thanks Received: 107
It is always a good idea when asking someone to look at your code for you to have comments embedded.
____________________________________________________
If it is to be, it is up to me.
All I Know About Trading Options I Learned in Flight School
June 3rd, 2011, 12:41 AM
Manta, Ecuador
Site Administrator Developer Swing Trader
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,398 since Jun 2009
Thanks Given: 33,173
Thanks Received: 101,537
You might ask @cory , I think he is a long term OEC user. I've got a HA EL indicator around here somewhere but no clue if it works, I've attached it.
Code
{
suri . HACandles
Original Code posted by SOLIDUS
Nov . 05 , 07 :
Heikin - Ashi Method of Candles by deMicron ( Suri Duddella )
http : //www.surinotes.com
}
inputs : UPcolor ( green ), DNcolor ( red ), WICKcolor ( black ), WICKwidth ( 1 ), BODYwidth ( 3 );
variables :
color ( 0 ),
BodySize ( iff ( bodywidth = 2 , 1 , iff ( bodywidth > 4 , 4 , bodywidth ) )),
Outline ( iff ( bodysize = 0 , 2 , iff ( bodysize = 1 , 3 , iff ( bodysize = 3 , 4 , 5 ))) ),
colorU ( UPcolor ),
colorD ( DNcolor ),
colorW ( WICKcolor ) ;
vars : haClose ( 0 ), haOpen ( 0 ), haHigh ( 0 ), haLow ( 0 ), CandleColor ( 0 ), CompBars ( 3 );
Var: DateC ( 0 ), TimeC ( 0 ),
bOpen ( 0 ), bClose ( 0 ), bHigh ( 0 ), bLow ( 0 );
{ Outlined Candles by Solidus
pixel sizes of plot widths
0 - 1px
1 - 2
2 - 3
3 - 4
4 - 6
5 - 8
6 - 14
}
{ ------------------------- Revision 1 Aug 15 07 ------------------------------
- Simplified coloring code for efficiency .
- Removed Once command to permit use with pre - 8.2 Tradestation .
- Added efficiency fix so RGB color values as inputs need only calculate once on startup .
}
// Heikin-Ashi Candles by Suri Duddella (deMicron)
if BarNumber = 1 then
begin
haOpen = open ;
haClose = ( O + H + L + C )/ 4 ;
haHigh = MaxList ( high , haOpen , haClose );
haLow = MinList ( low , haOpen , haClose );
end ;
if BarNumber > 1 then
begin
haClose = ( O + H + L + C )/ 4 ;
// haClose = (H+L+C)/3;
haOpen = ( haOpen [ 1 ] + haClose [ 1 ])/ 2 ;
haHigh = MaxList ( High , haOpen , haClose ) ;
haLow = MinList ( Low , haOpen , haClose ) ;
if haClose > haOpen then
Candlecolor = ColorU
else
Candlecolor = ColorD ;
for value1 = 1 to CompBars
begin
if haOpen <= MaxList ( haOpen [ value1 ], haClose [ value1 ]) and
haOpen >= MinList ( haOpen [ value1 ], haClose [ value1 ]) and
haClose <= MaxList ( haOpen [ value1 ], haClose [ value1 ]) and
haClose >= MinList ( haOpen [ value1 ], haClose [ value1 ]) then
Candlecolor = Candlecolor [ value1 ];
end ;
bOpen = haOpen ;
bClose = haClose ;
bHigh = haHigh ;
bLow = haLow ;
end ;
if bClose > bOpen then color = colorU else color = colorD ;
plot1 ( bClose , "c outline a" , colorW , 0 , outline );
plot2 ( bClose , "c outline b" );
plot3 ( bOpen , "o outline a" , colorW , 0 , outline );
plot4 ( bOpen , "o outline b" );
Plot5 ( bClose , "C" , color , 0 , bodysize );
Plot6 ( bOpen , "O" );
Plot7 ( bClose , "C outline" , colorW , 0 , outline );
Plot8 ( bOpen , "O outline" );
plot9 ( bHigh , "H" , colorW , 0 , WICKwidth );
plot10 ( bLow , "L" );
Mike
June 3rd, 2011, 09:46 AM
Denver
Posts: 3 since Jan 2011
Thanks Given: 0
Thanks Received: 1
Thanks BigMike I will take a look at the code and contact Cory.
Have a good one,
Arbitrage
Last Updated on June 3, 2011