Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SampleMACrossover live data vs. historical data

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • NinjaTrader_Ray
    replied
    I am coming in late so here is what I suggest.

    - On Tuesday reset your sim account via Tools > Options > Simulator
    - Run your strategy live for 100 shares
    - As soon as the strategy is started it will be in a position either long or short displayed in the Control Center window Strategies tab
    - If long, go to the Order tab and submit a market order to buy 100 shares in the Sim101 account, if short sell. This will sync the account position to the strategy position

    As soon as you feel the trade data is off, let me know. Please keep in mind that a strategy position is not the same as an account position. More information on that at the link below.

    Leave a comment:


  • kermode
    replied
    That doesn't answer my question at all. I realize the ENTRY NAME and EXIT NAME aren't correct. The trades however are. I went long at $27.41 and exited that position at $27.47. I went long again at $27.53 and exited at $27.49. I'm missing a SHORT trade in between. I ran a back test for todays day using the same strategy. The trades are SHORT, LONG, SHORT, LONG etc... With the live data the trades are LONG, LONG, LONG etc...

    Try as I might there isn't SHORT trade to be found in the live data.
    Attached Files

    Leave a comment:


  • NinjaTrader_Ben
    replied
    Hello,

    Please generate a report that starts on the same day that you started the strategy (or earlier) and you will see what you want to see.

    Starting your report while a trade is open, is causing Closes to be paired with Closes and Buys the be paired with Sells. Please look at the Entry and Exit columns in your screen shot and compare them with a report that is generated before your strategy has an open position.

    Leave a comment:


  • kermode
    replied
    That doesn't explain things as I see it.

    Please correct me if I'm wrong. The SampleMACrossover it supposed to do the following:

    1. When the fast SMA crosses over the slow SMA a LONG position is taken.
    2. This position remains open until the slow SMA crosses over the fast SMA.
    3. At this point the position is closed ans a new SHORT position is taken. This position will not close until the fast SMA crosses over the slow SMA.

    The result should be a list of trades that alternate between LONG and SHORT (or vice versa) as shown be back testing the strategy. As you can see be the list of trades only LONG position are being taken. Thus a trade is being skipped. By watching the Position Tab I can confirm that a position is being taken every other crossover.

    How do you explain that?
    Attached Files

    Leave a comment:


  • NinjaTrader_Ben
    replied
    Hello,

    After a second look at this, it seems there could be two things causing confusion for you here:

    -The MA cross strategy is an always in strategy. NT also tries to pair trades in the trades tab. Because the reporting is started mid signal NT pairs the close of the pre-existing signal with the close of the next signal and the next long signal with the sell short signal. That is why you see this odd pairing.

    -Also the trades tab only shows trades. An execution that is still open as a position, like what is shown in your screen shot, would be shown in your executions tab.

    Leave a comment:


  • kermode
    replied
    If you compare the chart to the trades tab you'll see that a LONG position was taken @ 27.41 and closed at 27.47. A short position didn't get taken @ 27.47. Why is that?
    Attached Files

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    Please post some screenshots of where you think there are discrepancies. The Account Performance tab just reports whatever has happened. If it is seen in executions it is there. You may be applying filters to your account tab. Please don't use filters like account or date.

    Leave a comment:


  • kermode
    replied
    I ran the SampleMAcrossover stragety against the MSFT and I received the same results. If i check the MAIN executions tab it seems to be perfect. However when I check the executions and trades tabs under the Account Performance tab it shows that positions are not being taken consistently.

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    Or try it on an equity like MSFT or AAPL.

    Leave a comment:


  • kermode
    replied
    As a matter of fact it is the YM on IB. So if I run the code on the S&P emini it should work correctly? I guess I'll fine out tomorrow morning.

    Cheers

    Leave a comment:


  • kermode
    replied
    Hi Ben,

    Here's a better look at the settings.

    Again the executions look fine. However positions are not being taken everytime the MAs cross. If I'm long/short it'll close that position and then wait until the MA cross again to take a new position. Looking at the executions, a position should be closed everytime the lines cross and a new one should be taken. Correct?
    Attached Files

    Leave a comment:


  • NinjaTrader_Dierk
    replied
    Sorry, screenshot is too small to see anything. Is this by chance the YM on TWS/IB? If so, then there is a bug which will be addressing with next release (~2 weeks) from now.

    Leave a comment:


  • NinjaTrader_Ben
    replied
    Hello,

    The screen shot is very small so I can hardly make out what is going on, however the executions look right on: previous order closes and a new order in the opposite direction every time the MA's cross.

    Leave a comment:


  • kermode
    replied
    Hi Ben,

    Here are the setting. The executions seem to be happening correctly, however I'm not taking positions (as previously explained).
    Attached Files

    Leave a comment:


  • NinjaTrader_Ben
    replied
    Hello,

    When you apply a new strategy, what are your order handling settings?

    Can you provide a screen shot of the chart with the executions and MA's on it?

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by trilliantrader, Today, 03:01 PM
0 responses
2 views
0 likes
Last Post trilliantrader  
Started by pechtri, 06-22-2023, 02:31 AM
9 responses
122 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by frankthearm, 04-18-2024, 09:08 AM
16 responses
67 views
0 likes
Last Post NinjaTrader_Clayton  
Started by habeebft, Today, 01:18 PM
1 response
8 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by benmarkal, Today, 12:52 PM
2 responses
19 views
0 likes
Last Post benmarkal  
Working...
X