Thanks again for Seetu. And thanks for answering a previous question. My backtesting works and I am ready to RunIt in order to 1) generate C2 signals for my strategy and 2) start autotrading at my Interactive Brokers account. Sorry for these basic questions but I can’t find the answers elsewhere.
I have a day trading system that enters/exits trade at specified times if other conditions met. So my buy/sell statements are:
tn = TimeNum();
Buy = myBuyCondition AND tn == entryTime;
Sell = mySellCondition OR tn == thisDayExitTime;
I use this C2TradingSignal:
C2TradingSignal(sigBTO, StopLoss = stopPrice, SigFilter = Buy);
Question 1) In all of the examples, I don’t ever find a corresponding C2TradingSignal for selling. That is, I never see this in your examples:
C2TradingSignal(sigSTC, SigFilter = Sell);
Isn’t something like that needed? Or does the Sell statement in the code handle it? And if that is the case, wouldn’t the Buy signal in the code also handle the buying (and thus what does the C2TradingSignal do?)?
Question 2) Does the StopLoss in the C2TradingSignal actually work? That is, if I am autotrading this, a stop loss order will be entered at my Interactive Brokers’ account? And if so, then I do not need to add that logic to mySellCondition?
Question 3) Is there a way to change an existing StopLoss in the code? So that it gets sent to my broker?
Question 4) I’m assuming that for my C2 strategy that is connected to my Seetu code, the StopLoss condition is checked once every bar (I’m assuming you don’t look at tick-by-tick data when running these things). And so for this intraday strategy, in order to have the StopLoss condition checked as often as possible, should I use:
SetOption(“Periodicity”,MINUTE1);
SetOption(“RunItSpec”,"
{mon, every 1 minutes between 9:49 and 16:00 },
tues, wed, etc…
i.e. use 1 minute bars and have the RunItSpec run every 1 minute?
Thanks again for your help!
Steve