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

[amibroker] Re: Emulate MS SmartChart feature



PureBytes Links

Trading Reference Links




Here 
is a example of Pyramiding, by Tomasz:
<FONT face=Arial color=#0000ff 
size=2> 

Hello,
Here is a simple sample of pyramiding "emulation":
// the example system buys on monday, wednesday (increasing pos)
// and sells on friday
BuyCond = DayOfWeek() == 1;
Buy2Cond = DayOfWeek() == 3; // pyramid
Sell = DayOfWeek()==5;
Buy = BuyCond OR Buy2Cond;
PositionSize = IIf( Buy2Cond, 2000, 1000 ); // 1000 is first trade
2000 is pyramided
Sell = Sell OR Buy2Cond;
/////////////////
Please set trade delays to zero in the settings page.

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: reyloufi 
  [mailto:etrel@xxxxxxxxx]Sent: Monday, July 05, 2004 6:11 
  AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: 
  market positionHi hermannmaybe...look pretty 
  sophisticate to meI just want to set the condition3 (just an example "buy 
  when condition1 or condition2 occur")"if I am already long(because 
  condition1 was the buy signal), do not buy even if buycondition2 occurs. 
  If I am flat, buy "this is literally a market position conditionThanks 
  to helpPhilippe--- In amibroker@xxxxxxxxxxxxxxx, "Herman van 
  den Bergen" <psytek@xxxx> wrote:> Perhaps this is what you 
  are looking for:> > delay = 1;> InLong = 
  ref(Flip(Buy,Sell),-delay);> InShort = 
  ref(Flip(Short,Cover),-delay);> > herman>   
  -----Original Message----->   From: reyloufi 
  [mailto:etrel@xxxx]>   Sent: Monday, July 05, 2004 4:16 
  AM>   To: amibroker@xxxxxxxxxxxxxxx>   
  Subject: [amibroker] market position> > >   
  Hi>   Being a TS trader on e-minis futures, I plan to use AB 
  to get better>   backtesting 
  optimization...>   I have some difficulties to jump from TS 
  to AB>   Having several buy/sellshort entry conditions in my 
  strategy (ies), I>   use to have a very basic condition 
  to control if you are already into>   the 
  market>   In EasyLanguage, it is the MarketPosition 
  function>   How does it work in AB?>   
  Thanks to help>   Philippe> > > > 
  > >   Check AmiBroker web page at:>   
  http://www.amibroker.com/> 
  >   Check group FAQ at:> <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html> 
  > >         Yahoo! 
  Groups 
  Sponsor>               
  ADVERTISEMENT> > > > > > 
  ----------------------------------------------------------------------------> 
  -->   Yahoo! Groups Links> 
  >     a.. To visit your group on the web, go 
  to:>     <A 
  href="">http://groups.yahoo.com/group/amibroker/> 
  >     b.. To unsubscribe from this group, send an 
  email to:>     
  amibroker-unsubscribe@xxxxxxxxxxxxxxx> >     
  c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
  Service.Check AmiBroker web page at:<A 
  href="">http://www.amibroker.com/Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  


Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html








Yahoo! Groups Sponsor


  ADVERTISEMENT 












Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/ 
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.