this works for me:
ProfitPips = 15;
StopLossPips = 15;
TimeFrameSet( -1);//tick by tick
SetOption("InitialEquity", 10000);
SetOption("FuturesMode", True);
SetOption("MaxOpenPositions", 1);
SetOption ("CommissionMode", 2); // for spread
SetTradeDelays( 0, 0, 0, 0 );
SetOption ("CommissionAmount", 10);spread = 2;// spread is 2 pips

PointValue = 100000;   // standard lot 1 pip = 10$, for 1 pip = 1$
PointValue should be 10000
TickSize = 0.0001; // it works for 4 or 5 digits broker
MarginDeposit = 1000; // 1% margin per lot
PositionSize = 1000;
TakeProfit = ProfitPips * TickSize + spread * TickSize;
StopLoss = StopLossPips * TickSize - spread * TickSize;
Buy= 1 ;
Sell=0;
Short =0;
Cover=0;
ApplyStop (stopTypeLoss,stopModePoint,StopLoss,0,False,1);//stoploss
ApplyStop
(stopTypeProfit,stopModePoint,TakeProfit,0,False,1);//takeprofit


--- In [email protected], "dralexchambers" <dralexchamb...@...>
wrote:
>
> Hi,
>
> I've been trying to do a points only backtest for the GBPUSD. I have
been using the code below:
>
> SetBacktestMode( backtestRegular );
> SetOption("FuturesMode", True);
> SetOption("InitialEquity", 10000);
> SetOption("AllowPositionShrinking", 1);
> SetOption("CommissionMode", 2);
> SetOption("CommissionAmount", 0);
> RoundLotSize = 1;
> PointValue=1;
> PositionSize = MarginDeposit = 1;
>
>
> But it doesn't work!
>
> I'd like for each each 1 pip move to give a profit/loss of $1. For
GBPUSD 1 pip = 0.0001 move. This is so I can compare trading systems by
how many pips they make, not $ profit.
>
> Thanks,
> Alex
>


Reply via email to