Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I've been sim trading a strategy that calls an ATM when getting buy or sell signals, and last night copied it and took out the buy/sell actions and replaced them with playsound and drawarrow commands so it was a "signal only" strat.
I then ran both on live ES data, using signals generated by the "signal only" strat to manually enter trades in one of my brokerage accounts. All in a days work.
BUT... the "signal only" strat was generating calls that the sim trader never took, and in some cases sim trader kicked in a few bars later. The "signal only" strat appeared to follow the conditions in the strat perfectly, while the one that does the buy/sell was less predictable.
Any ideas on where I should look for errors?
FWIW the ATM call strategy is cut-and-paste from the factory example.
Can you help answer these questions from other members on NexusFi?
The call ATM one has this instead of the drawarrowup, etc:
{
// ATM Strategy code cut-and-paste from NT
// Make sure this strategy does not execute against historical data
if (Historical)
return;
// Submits an entry limit order at the current low price to initiate an ATM Strategy if both order id and strategy id are in a reset state
// **** YOU MUST HAVE AN ATM STRATEGY TEMPLATE NAMED 'ES 2 w BE and Trail' CREATED IN NINJATRADER (SUPERDOM FOR EXAMPLE) FOR THIS TO WORK ****
if (orderId.Length == 0 && atmStrategyId.Length == 0 && Close[0] > Open[0])
{
atmStrategyId = GetAtmStrategyUniqueId();
orderId = GetAtmStrategyUniqueId();
AtmStrategyCreate(Action.Buy, OrderType.Market, 0, 0, TimeInForce.Day, orderId, "ES 2 w BE and Trail", atmStrategyId);
}
// Check for a pending entry order
if (orderId.Length > 0)
{
string[] status = GetAtmStrategyEntryOrderStatus(orderId);
// If the status call can't find the order specified, the return array length will be zero otherwise it will hold elements
if (status.GetLength(0) > 0)
{
// Print out some information about the order to the output window
Print("The entry order average fill price is: " + status[0]);
Print("The entry order filled amount is: " + status[1]);
Print("The entry order order state is: " + status[2]);
// If the order state is terminal, reset the order id value
if (status[2] == "Filled" || status[2] == "Cancelled" || status[2] == "Rejected")
orderId = string.Empty;
}
} // If the strategy has terminated reset the strategy id
elseif (atmStrategyId.Length > 0 && GetAtmStrategyMarketPosition(atmStrategyId) == Cbi.MarketPosition.Flat)
atmStrategyId = string.Empty;
if (atmStrategyId.Length > 0)
{
// You can change the stop price
if (GetAtmStrategyMarketPosition(atmStrategyId) != MarketPosition.Flat)
AtmStrategyChangeStopTarget(0, Low[0] - 3 * TickSize, "STOP1", atmStrategyId);
// Print some information about the strategy to the output window
Print("The current ATM Strategy market position is: " + GetAtmStrategyMarketPosition(atmStrategyId));
Print("The current ATM Strategy position quantity is: " + GetAtmStrategyPositionQuantity(atmStrategyId));
Print("The current ATM Strategy average price is: " + GetAtmStrategyPositionAveragePrice(atmStrategyId));
Print("The current ATM Strategy Unrealized PnL is: " + GetAtmStrategyUnrealizedProfitLoss(atmStrategyId));
}
i know from some examples where the printed values of indicators hasnt been the same as the values using this indicator in a strategy - always because of a special + unique coding-problem.
so your arrow+sound is a plotting-thing + order-execution is a strategy-thing.
i see you use the ADXVMA -- thats one of the examples i am talking about -- i had trouble too with that some time ago.
here is a link -- have a look + test it .