[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Is this possible? Its doing my head in.



PureBytes Links

Trading Reference Links


peter j <amiabilityy@xxxxxxxxx> wrote:


Is it possible to create a trade flag for this.
   With out using exrem,
   If buy==1 and sell ==0, and the previous trade has been closed ,then buy.
    If buy==0 and sell==1 and in a trade which has not had a sell signal, then sell. 
     If buy==1 and sell ==1 and the previous buy has had a sell signal before today, then buy and sell on the same bar. 
    If buy ==1 and sell==1 and the previous buy has not had a sell signal  before today, then  sell.  (dont place a new buy  on the same bar that has a sell).   
   I guess this needs a loop.
 
 Basically i am trying to bypass using exrem, to allow an entry and exit on the same bar,
 
 I dont want an a new entry placed  when already in a trade, on the day of the sell, as the trade was not closed.
  2 entries before a sell would not be realistic.
  This happens when using exrem.
 
  The attached files shows a sample from a backtest using exrem.
   I am trying to avoid the same result as in the attachment.
 
 
  Peter.
  
 
   


Do you Yahoo!?The New Yahoo! Search - Faster. Easier. Bingo. > ATTACHMENT part 2 image/gif name=ami.GIF 
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.






Yahoo! Groups Sponsor












Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.