Amibroker formula coading help required

Discussion in 'Advanced Trading Strategies' started by balakumaran, Oct 15, 2016.

  1. balakumaran

    balakumaran New Member

    Joined:
    Oct 15, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Dear traders ,
    i required help on afl coading for exitprice that is if i exit my position in multiple condition then in backtest report it showing close price of that candel.but i required exact price of what my condition. for example if my condition is cross(prevdayc,l) or (h < prevdayc) or (c < ma(period,c) ; position will exit when low crossing prevdayc actual exit price is prevdayc and like this other cond also.but backtest report will show close of the candel .how to correct this .
     
  2. vishp127

    vishp127 Member

    Joined:
    Oct 7, 2016
    Messages:
    48
    Likes Received:
    17
    Trophy Points:
    8
    Linsupertrend and PSA (Price Speed Acceleration)



    I need help with above..
     
  3. vijkris

    vijkris Well-Known Member

    Joined:
    Mar 4, 2013
    Messages:
    3,714
    Likes Received:
    7,939
    Trophy Points:
    113
    Location:
    hyderabad
    This happens because in ur formula u did not mention sellprice/coverprice.
    U just mentioned sell/cover.
    The exit will happen according to ur condition but since sellprice is missing, it ll take close of the candle as exit price.
     
  4. vishp127

    vishp127 Member

    Joined:
    Oct 7, 2016
    Messages:
    48
    Likes Received:
    17
    Trophy Points:
    8
    I am not sure if this can answer your question.. :)
    http://www.marketcalls.in/afl-code/start-scanning-stocks-using-amibroker-exploration.html
     
  5. vishp127

    vishp127 Member

    Joined:
    Oct 7, 2016
    Messages:
    48
    Likes Received:
    17
    Trophy Points:
    8
    Amibroker afl coding help required

    Whenever I press Explore button, I want this afl to display only 1 symbol in Automatic Analysis window out of watchlist. Something is missing there, please help me.. :)

    wlnum = GetOption( "FilterIncludeWatchlist" );
    List = CategoryGetSymbols( categoryWatchlist, wlnum ) ;

    if ( Status("stocknum") == 0 )
    {
    StaticVarRemove( "rank*" );

    for ( n = 0; ( Symbol = StrExtract( List, n ) ) != ""; n++ )
    {
    SetForeign ( symbol );
    values = Roc( Close, 10 );
    RestorePriceArrays();
    StaticVarSet ( "valuesToSort" + symbol, values );
    }

    StaticVarGenerateRanks( "bot", "valuesToSort", -1, 1234 );
    }

    symbol = Name();

    rank = StaticVarGet ( "rank" + "values" + symbol );

    AddColumn ( rank, "AbsValues" );

    Filter = rank <= 1;
     
    Last edited: Nov 27, 2016
  6. balakumaran

    balakumaran New Member

    Joined:
    Oct 15, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    thanks ..... to all for your replies and help and i solved my problem by using iff condition . buy price = iff( )...iff ( ) like that.
     

  7. BURAN

    BURAN New Member

    Joined:
    Aug 22, 2006
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    dear sir, how is amibroker software? how is its scanning and exploration facilities? I am seriously thinking to buy amibroker software and e signal data.

    regards. buran,
     
  8. pawarganesh

    pawarganesh New Member

    Joined:
    Sep 7, 2011
    Messages:
    18
    Likes Received:
    3
    Trophy Points:
    3
    Amibroker is really good, I have used multiple charting softwares but the kind of flexibility and power you can get in Amibroker is Unique. It is also super fast and easy to code with tons of examples all around.

    I have licenses Amibroker v 6.10 and I will certainly recommend Buying it as it is worth it. In terms of Data you dont need e-signal, there are many cheaper options available that provide tick data at around 500 Rs per segment per month. That works well with Amiboker.

    Happy Trading.
    Ganesh
     
    vijkris and TracerBullet like this.
Loading...

Share This Page