Australian (ASX) Stock Market Forum

Recent content by crunchor

  1. C

    Amibroker FAQ

    thx. I tried to change the code to use open price, but then it has 80% win instead of 100%, I am still thinking where is the problem: SetPositionSize( 100, spsPercentOfEquity ); acc = 0.02; accm = 0.2; sarc = SAR( acc, accm ); Buy = Sell = 0; Short = Cover = 0; YourBuyConditions...
  2. C

    Amibroker FAQ

    hi and thx. I asked you before how to do these: How to change this AFL codes to Sell =(SAR() > C) + "only sell if the price is higher than the bought price"? You told me to try sellPrice>BuyPrice; Here is my code: Buy = BuyPrice>=L AND BuyPrice<=H AND Cross(Open,SAR()); Sell...
  3. C

    Amibroker FAQ

    I am still very confused that does the "C" in cross(C,SAR()); means current price or close... If I want to just buy when the SAR cross within the price between day high and low (which is all possible price within that day), does it make sense to have cross(C,SAR());? Is there a way to use the...
  4. C

    Amibroker FAQ

    Hi, may I know these: 1. I think C in cross(C,SAR() means using close price to do the cross, if I use cross(Open,SAR()). then I use the open price to compare with the SAR at the open price right? I guess SAR in amibroker would not always use the close SAR even I do the (Open, SAR())? 2. Even...
  5. C

    Amibroker FAQ

    thx and I will try this once I get back to home. By the way I found out that the default SAR in Amibroker may has bug. I set the SAR to SAR(0.1,1) and apply to index history with around 10000 - 25000 range normally, and there are always having the exact same SAR in the day right after the SAR...
  6. C

    Amibroker FAQ

    I tried this before but it doesn't work. My codes above would always have either buy or sell signal. Let's say bar 1 is a buy signal, then 100% buy in, then coming bar 2, bar 3, bar 4 all are raising and there are buy signal for these bars too. Then in bar 5, there is sell signal, but then the...
  7. C

    Amibroker FAQ

    How to change this AFL codes to Sell =(SAR() > C) + "only sell if the price is higher than the bought price"? Here is the code: Buy = SAR() < C; Sell =SAR() > C; BuyPrice = SAR() + 0.01; SellPrice = SAR() - 0.01; SetPositionSize( 100, spsPercentOfEquity );
  8. C

    Amibroker FAQ

    sig is default key word? No need to declare? If I just want to like...whenever buy then just 20% of all cash, but whenever sell 100%, how to do that?
  9. C

    Amibroker FAQ

    Hi all, I am new:) How to have different SetPositionSize for buy and sell?
Top