NexusFi: Find Your Edge


Home Menu

 





HA Indicator


Discussion in Platforms and Indicators

Updated
      Top Posters
    1. looks_one arbitrage with 2 posts (0 thanks)
    2. looks_two Supa65 with 1 posts (0 thanks)
    3. looks_3 Big Mike with 1 posts (0 thanks)
    4. looks_4 HowardCohodas with 1 posts (0 thanks)
    1. trending_up 4,098 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

HA Indicator

  #1 (permalink)
arbitrage
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;

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Build trailing stop for micro index(s)
Psychology and Money Management
NexusFi Journal Challenge - April 2024
Feedback and Announcements
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
36 thanks
NexusFi site changelog and issues/problem reporting
25 thanks
GFIs1 1 DAX trade per day journal
19 thanks
The Program
18 thanks
  #2 (permalink)
 
HowardCohodas's Avatar
 HowardCohodas 
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
Reply With Quote
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
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
0507
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=21iff(bodywidth>44bodywidth) )),
Outline(iff(bodysize=02iff(bodysize=13iff(bodysize=345)))  ),     
colorU(UPcolor), 
colorD(DNcolor),
colorW(WICKcolor)    ;


varshaClose(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
1px 





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 MaxListhighhaOpenhaClose);
            
haLow MinListlowhaOpen,haClose);
        
end;

        if 
BarNumber 1 then
        begin
            haClose 
= (O+H+L+C)/4
        
//    haClose = (H+L+C)/3; 
            
haOpen = (haOpen [1] + haClose [1])/;
            
haHigh MaxList(HighhaOpenhaClose) ;
            
haLow MinList(LowhaOpenhaClose) ;
    
            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

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #4 (permalink)
arbitrage
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

Reply With Quote




Last Updated on June 3, 2011


© 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