- Joined
- 20 May 2008
- Posts
- 1,158
- Reactions
- 8
Just want to know if I'm doing the following correctly:
(1) I want Cond1 to find a stock that has closed 10% above the lowest low in the past 20 days:
(2) I want Cond2 to find a stock where its 20 day MA is 10% above its 100 day MA:
Also after a backtest, when I look at the Reports --> Trades section, the position sizes are fluctuating wildly. I am using the following for position size and max. open positions:
I understand that there should be some fluctuation as my open equity fluctuates, but the variations in trade size are far larger than they should be.
(1) I want Cond1 to find a stock that has closed 10% above the lowest low in the past 20 days:
Code:
Cond1 = C > (LLV(Low,20)*1.1)
(2) I want Cond2 to find a stock where its 20 day MA is 10% above its 100 day MA:
Code:
MA1 = MA (C, 20)
MA2 = MA (C, 100)
Cond2 = MA1 > (MA2*1.1)
Also after a backtest, when I look at the Reports --> Trades section, the position sizes are fluctuating wildly. I am using the following for position size and max. open positions:
Code:
SetPositionSize( 5, spsPercentOfEquity );
SetOption( "MaxOpenPositions", 20 );