I'm new to amibroker. I was just wondering if it’s possible to backtest a order for a stock on a particular day. Basically what I’m asking is can we check what would have happened if we would have placed xyz bracket order on abc stock on let’s say 5th October’18 at 9.15 am ? Is there any way to conduct such analysis?
Profit_amount = 15;
Loss_amount = 10;
SetOption( "InitialEquity", 100000 );
SetOption( "FuturesMode", False);
//SetOption( "PriceBoundChecking", False );
SetPositionSize( 100, spsShares );
dt = DateTime();
Buy = dt == _DT( "2018-10-05 09:15:00" );
BuyPrice = Open;// add your custom buy price
Sell = 0;
ApplyStop(stopTypeProfit, stopModePoint, Profit_amount, 1);
ApplyStop(stopTypeLoss, stopModePoint, Loss_amount, 1);
Thank you so much for replying. I just wanted to know if it's possible or not but looks like you have also shown me a way. However, I don't understand anything in it as I don't have a coding background. But I have plans to learn it asap and hopefully then I can draw some sense out of your reply.