I am trying to do , in theory , a very basic System , however I am not able to come up with the code.
Long on the close of today´s bar.
Sell: on open of tommorrow´s bar; then reverting with short on the same open and Cover on the same day on the close.
I enter long on the close of March 23 and I sell it at the open price of MArch 24 and on March 24 a enter short on the open and close on the 24th at the close.
It is a stop-reverse system.
I read the manual " REsolving Same bar, same symbols signal conflicts" and also the guide " short trade suport" but I am not able to get what I have explained about. I tried with the AllowsamebarExit, with the Holdminbars and with the tradedelay and I am not able to get it.
This is the basic code that I Have to starts , I am sure there is a way to do it but I do not see.
Thanks a lot in advance
t//Long: Buy en el Close y Sell en el Open next Day //Short: Short en el Open y Cover en el Close same day SetBacktestMode(backtestRegularRawMulti); Buy=1; Sell=1; Short=sell; Cover=Buy; //SetTradeDelays(0,0,0,0); BuyPrice=C; SellPrice=O; ShortPrice=O; CoverPrice=Close; //PART 2 - BACKTESTER SETTINGS OwnCapital = 100000; // Initial capital SetBacktestMode(backtestRegular); // Backtest mode - raw used so that Amibroker doesn't automatically filter out excessive signals SetOption("InitialEquity",OwnCapital); // Initial capital, using OwnCapital variable from part 1 //SetOption("AllowSameBarExit",true); // Disable same bar exit as the strategy exits at open of the following day SetPositionSize(100,spsPercentOfEquity); //we invest 100% of equity - compounding //SetOption("ReverseSignalForcesExit",True); SetOption("MaxOpenPositions",1); ype or paste code here