Hi Jason
Thank you for your last reply. Here is more:
26. In my efs (real time trading with IB) I have a button to start.
Then, when I hit the button the code checks for close(-1), if it's above/below some value, I buy/sell at Market.
The problem is that after hitting ON on the button, the trade is done only at the begining of the next candle, and in a 10 minute chart for ER2, that might be a long time.
How can I get the current market value when the efs runs first time, and then trade at Market, in the same bar?
27. The same problem I am having when Interrupting for Lunch.
If it's between 12:00 and 13:00, I do a return, and then the first trade is done only at 13:10 on a 10 min chart.
This I can fix by moving my time to 12:50, but for the efs start in the morning I have no solution.
28. I understand that in a Tick chart (in real time) the efs runs at every tick. How often does the efs run on a emini minutes chart?
Code example:
function ONOFFButton()
{
if (TradingSystemONOFF) { TradingSystemONOFF = false; }
}
main(...) {
if (TradingSystemONOFF) {
//Buy Condition
if ((close(-1) > study + crossOffset) && !StrategyisLong) {
nNewTrade = 1; // New Trade Trigger
nsignal = 1; // Buy Signal - Trade Type
...
}
if (nNewTrade == 1) { //Execute New Trade
if (StrategyisInTrade == true) {
...
}
} else { //Enter New position, i.e. use One lotSize
if ((nsignal > 0)) {
IBtrade.Buy(getSymbol(), lotSize, IBBroker.MARKET);
...
} // end if IN TRADE
} // END EXECUTE NEW TRADE
...
}
Many thanks, Arie
Thank you for your last reply. Here is more:
26. In my efs (real time trading with IB) I have a button to start.
Then, when I hit the button the code checks for close(-1), if it's above/below some value, I buy/sell at Market.
The problem is that after hitting ON on the button, the trade is done only at the begining of the next candle, and in a 10 minute chart for ER2, that might be a long time.
How can I get the current market value when the efs runs first time, and then trade at Market, in the same bar?
27. The same problem I am having when Interrupting for Lunch.
If it's between 12:00 and 13:00, I do a return, and then the first trade is done only at 13:10 on a 10 min chart.
This I can fix by moving my time to 12:50, but for the efs start in the morning I have no solution.
28. I understand that in a Tick chart (in real time) the efs runs at every tick. How often does the efs run on a emini minutes chart?
Code example:
function ONOFFButton()
{
if (TradingSystemONOFF) { TradingSystemONOFF = false; }
}
main(...) {
if (TradingSystemONOFF) {
//Buy Condition
if ((close(-1) > study + crossOffset) && !StrategyisLong) {
nNewTrade = 1; // New Trade Trigger
nsignal = 1; // Buy Signal - Trade Type
...
}
if (nNewTrade == 1) { //Execute New Trade
if (StrategyisInTrade == true) {
...
}
} else { //Enter New position, i.e. use One lotSize
if ((nsignal > 0)) {
IBtrade.Buy(getSymbol(), lotSize, IBBroker.MARKET);
...
} // end if IN TRADE
} // END EXECUTE NEW TRADE
...
}
Many thanks, Arie
Comment