PureBytes Links
Trading Reference Links
|
Hello,
I have a problem with properly Backtesting my trading idea.
I want to have anProfitTarget of %2 - I wanted to collect the profits
and exit position when the profit reaches to %2 within day starting
from the next day the position is opened.
For this first I only used the Settings window in AA and set the
profit target to 2% and "Exit at intraday stop (1)" but backtester
always exits the position from the close price on the day of exit.
So I have specified the BuyPrice and SellPrice in my code. When I
Explore the my code, I see my BuyPrice and SellPrice as I intend to
in the columns listed. But when it comes to Backtesting, although the
BuyPrice is the same value as the explored colums, where as the
SellPrice is always equal to the Close value on the day of exit
position. I could not change this no matter what I did. I have also
tried to define the stop within code with:
ApplyStop(stopTypeProfit,stopModePercent,kProfitTarget,1);
but nothing seems working
I would appreciate if someone understands wahts happening or had the
same problem before could give me some idea about this situation.
Thanks.
|