EasyLanguage Treasure Chest

Discussion in 'Trading Software' started by Tums, Nov 24, 2008.

Thread Status:
Not open for further replies.
  1. veggen

    veggen

    This is how Market-E-Motion looks.

    <img src=http://elitetrader.com/vb/attachment.php?s=&postid=2198394 width=800>
     
    #31     Nov 28, 2008
  2. veggen

    veggen

    Tums; the HA-bars you have posted, are those the modified ones from Piscuy?

    I have tried it with OEC, and ones again something is horribly wrong because nothing happens when I try posting the indicator on my chart. The thing is, when I compile the new code, everything seems to be just fine. No error messages at all! I just do not get what is wrong..

    Have anybody here experienced the same problems with OEC?

    veggen
     
    #32     Nov 29, 2008
  3. Tums

    Tums

    No, it is just the regular one.
     
    #33     Nov 29, 2008
  4. Tums

    Tums

    #34     Nov 29, 2008
  5. veggen

    veggen

    That is a handy indicator. Do you have the file in EL - format as well?
     
    #35     Nov 29, 2008
  6. veggen

    veggen

    These are the Piscuy HA-modified bars.

    Code:
    [color=blue]
    Inputs:
    	UpColor(Blue),
    	DnColor(Red),
    	WarnColor(Yellow),
    	MinCompBars(0),
    	MaxCompBars(6),
    	nPlotWidth(1);
    
    Vars:
    	haClose(0),
    	haOpen(0),
     
    	{
    	haCloseShow(0),
    	haOpenShow(0),
            }
    
            haMinDir(0),
            haMaxDir(0),
            Color(0);
    
    { Get HA Direction for Min/Max Compare Bars }
    haMinDir = fModHAKahuna(MinCompBars, haOpen, haClose);
    haMaxDir = fModHAKahuna(MaxCompBars, haOpen, haClose);
    	
    { Load Display Color }
    if haMinDir = 1 and haMaxDir = 1 then 
     begin
      Color = UpColor;
    		
     end;
    
    if haMinDir = 2 and haMaxDir = 2 then 
     begin
       Color = DnColor;
    
     end;
    		
    if haMinDir <> haMaxDir then 
     begin 
      Color = WarnColor;
    	
    	
     end;
    
    	
    
    { Paint Bar }
    PlotPB(haOpen,haClose, "ModHA2", Color);
    SetPlotWidth(1,nPlotWidth);
    SetPlotColor(1,color);
    
    #function fModHAKahuna
    Inputs:
    	CompBars(numericsimple),
    	oOpenVal(numericref),	{Output: HA Open Price}
    	oCloseVal(numericref)	{Output: HA Close Price}
    ;
    
    Vars:
    	haClose(0),
    	haOpen(0),
    	haHigh(0),
    	haLow(0),
    	Index(0),
    	UpVal(1),	{Constant: Up haDir value}
    	DownVal(2),	{Constant: Down haDir value}
    	Return(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
    else {BarNumber > 1 }
     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
     Return = UpVal
    else
     Return = DownVal;
    		
    for Index = 1 to CompBars
     begin
      if haOpen <= MaxList(haOpen[Index],haClose[Index]) and
         haOpen >= MinList(haOpen[Index],haClose[Index]) and
         haClose <= MaxList(haOpen[Index],haClose[Index]) and
         haClose >= MinList(haOpen[Index],haClose[Index]) then
       Return = Return[Index];		
      end;
    
    end;
    
    {Load Output Values}
    oOpenVal = haOpen;
    oCloseVal = haClose;
    fModHAKahuna = Return;
    [/color]
    
     
    #36     Nov 29, 2008
  7. Tums

    Tums

    I doubt it would work in OEC... because it involves drawing objects.
     
    #37     Nov 29, 2008
  8. veggen

    veggen

    Do you have the "Add Time" function as well?
     
    #38     Nov 29, 2008
  9. Tums

    Tums

    here it is...

    Code:
    [color=blue]
    [LegacyColorValue = true]; 
    
    { User Function: AddTime
       Inputs : xTime - time in 24 hour format.
       Minutes - amount to add/subtract to xTime.
       
       Sample Usage :
       if (Time[0] > AddTime (Sess1StartTime, +30))
       then ...
       
       Returns: Adjusted time in 24 hour format.
       Properties
       [ ] Auto Detect
       [*] Simple
       [ ] Series
       
       Provided by Product Support Dept.
       of Omega Research, Inc.
       }
       
       Inputs : xTime (NumericSimple),
    
       Minutes (NumericSimple) ;
       
       AddTime = MinutesToTime (TimeToMinutes (xTime) + Minutes) ;
    [/color]
    
     
    #39     Nov 29, 2008
  10. veggen

    veggen

    Not unexpected, I was not able to compile the code.
    But what I do not get, is that it is such a simple thing it does not understand.

    "iTL_Style( tool_Dotted )," - that is what I get an error message of. I have tried "Solid", "Dashed" but it does not understand ether one.

    Any suggestions?
     
    #40     Nov 29, 2008
Thread Status:
Not open for further replies.