Bill,

Thank you for your reply.
To check out this condition, I reduced wrote a formula with just 2 conditions.
Here is the formula,

_SECTION_BEGIN("2 conditions only");
Filename = StrLeft(_DEFAULT_NAME(),StrLen(_DEFAULT_NAME())-2); 

// next 4 lines are for ER2 futures
PointValue = 100; 
NumContracts = 1; MarginDeposit = 100; PositionSize = NumContracts * 
MarginDeposit; 
Range1= Optimize("range1",7,1,10,1); 
Range2= Optimize("range2",6,1,10,1); 
Plot(C,"",1,128);
Plot(EMA( Close,range1), "Stopline", colorRed ); 

//Buy Signals
Hist1 = MACD() - Signal();
Condition1 = MACD() > Ref(MACD(),-1);
Condition3 = Hist1 < Ref(Hist1, -1);

//Sell Signals
Condition11 = MACD() < Ref(MACD(),-1) AND MACD() > 0;
Condition3 = Hist1 < Ref(Hist1, -1);

//Buy and Sell orders
Buy = Condition1 AND Condition3;
Sell =Condition11 AND Condition3;

//Short and Cover conditions
Short=Sell;
Cover=Buy;
AlertIf( Buy, "EMAIL", "A sample alert on "+FullName(), 1 );

However, I look at my chart and I have these figures.
10/11-Macd =11.81, signal = 12.64, histogram = -.0833732
10/10-Macd =11.34, signal = 12.85, histogram = -1.50653
However, my last trade was 9/27 until 10/25 with a short.
I should have had a buy signal on 10/11

Thanks,
Tom


  Sent: Friday, October 26, 2007 10:10 AM
  Subject: Re: [amibroker] MACD Histogram



  Based on your question, I assume that your formula is:

  buy = condition13 + other conditions;

  What are the other conditions?  Is there an interaction between condition13 
and other conditions?  You haven't provided enough information.

  Bill
  Recent Activity
    a..  48New Members
    b..  1New Files
  Visit Your Group 
  Yahoo! News
  Kevin Sites

  Get coverage of

  world crises.

  Yahoo! Finance
  It's Now Personal

  Guides, news,

  advice & more.

  Yahoo! Groups
  Find Green Groups

  Share with others

  Help the Planet.
  . 
   

Reply via email to