Simple Coding Help - No Promise.

RequestMouseMoveRefresh(); (Errors there sir ji )
What do you mean??? Which version you are on???
What you are asking need AB above 6.0! Time to upgrade!
 
I am backtesting a strategy on a list of 100 stocks and max open position is defined as 1. If there are simultaneous buy signals on a particular bar, which stock will be chosen? Is it alphabetical ? Will be grateful for guidance
As per this KB Article: Symbol selection when PositionScore is not defined.

If PositionScore is not defined or it has the same value for two or more symbols, then AmiBroker will use the following rules:
  1. Transaction with greater PositionSize is preferred – the comparison method depends on the position sizing approach used in our code:
    • If we use SetPositionSize( dollarvalue, spsValue) – then $ value is compared.
    • If we use SetPositionSize( shares, spsShares) – then number of shares is used for comparison.
    • If we use SetPositionSize( perc, spsPercentOfEquity) – then % equity matters.
  2. Alphabetical order
  3. Long trades rather than short trades, if both occur at the same time for the same symbol.
 
As per this KB Article: Symbol selection when PositionScore is not defined.

If PositionScore is not defined or it has the same value for two or more symbols, then AmiBroker will use the following rules:
  1. Transaction with greater PositionSize is preferred – the comparison method depends on the position sizing approach used in our code:
    • If we use SetPositionSize( dollarvalue, spsValue) – then $ value is compared.
    • If we use SetPositionSize( shares, spsShares) – then number of shares is used for comparison.
    • If we use SetPositionSize( perc, spsPercentOfEquity) – then % equity matters.
  2. Alphabetical order
  3. Long trades rather than short trades, if both occur at the same time for the same symbol.
thanks a lot...information has really helped me...
 
.
 

Similar threads