NexusFi: Find Your Edge


Home Menu

 





Flatten All ?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one phyzfer with 5 posts (1 thanks)
    2. looks_two Big Mike with 4 posts (0 thanks)
    3. looks_3 DavidHP with 1 posts (0 thanks)
    4. looks_4 gregid with 1 posts (2 thanks)
    1. trending_up 6,631 views
    2. thumb_up 3 thanks given
    3. group 4 followers
    1. forum 12 posts
    2. attach_file 0 attachments




 
Search this Thread

Flatten All ?

  #11 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,612 since Aug 2009
Thanks Given: 11,342
Thanks Received: 2,747


phyzfer View Post
7 only. It's very useful and goes around some of the idiotic NT nuances for order handling.

Yes I may have to do this too.

It seems there is an issue with 'reversing' orders in NT.
I have been testing the strategy posted in Mike's video and I changed the parameters so that you would always be short or long.

However, when you try to let the strategy reverse by entering the opposite direction, NT gives an error about 'OverFill' and disables the strategy.

I'm not sure how to proceed without managing it myself.

Do you know of another way to reverse and still use named orders
(i.e. in the strategy, 'target1', target2', 'target3' are used but when you try to use them the error is generated)

 
Code
private void GoLong()
    {
    SetProfitTarget("target1", CalculationMode.Price, Close[0] + (Target1*TickSize));
    SetProfitTarget("target2", CalculationMode.Price, Close[0] + (Target2*TickSize));
    SetProfitTarget("target3", CalculationMode.Price, Close[0] + (Target3*TickSize));

        EnterLong("target1");
        EnterLong("target2");
        EnterLong("target3");
    }
Thanks

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on Twitter Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
REcommedations for programming help
Sierra Chart
MC PL editor upgrade
MultiCharts
How to apply profiles
Traders Hideout
 
  #12 (permalink)
 phyzfer 
Chicago
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/Zen-FIre
Trading: GC, ES
Posts: 73 since Mar 2010
Thanks Given: 40
Thanks Received: 33

DavidHP,

This is how I handle reverses without using their order handling (there in NT7).
I have a marked price (The reverseAtPrice), and I listen to each tick to see if the market has touched it. Once this price gets hit (it happens to be the SL price for one of the legs of my total quantity), I set a boolean flag to say reverseoccurred.

I then check every OnBarUpdate if this flag is true and the position is flat, if so, I enter a bunch of orders in the opposite direction.

Even if you are not using SL orders and waiting for the SL orders to kick in, you can save a "reverseAtPrice" and compare the Close[0] to it.

I hope that helps.

Started this thread Reply With Quote
  #13 (permalink)
 leinster 
Brussels / Dublin
 
Experience: Intermediate
Platform: ninjatrader
Trading: Stdev + 2
Posts: 468 since Jun 2010
Thanks Given: 844
Thanks Received: 595


Hi David,

I also came up against the reversal issue with ninja in a trade strategy that i need.

Ive just kicked off using the SubmitOrder but aint seeing very many example code snippets in help etc specifically regarding stop setting etc.

Would you be so kind as too just paste in a few lines off code associated with u using SubmitOrder so i can take as pointers. I also see disconnect options issue listed when using the submit order and obviously i dont want that to be an issue either.

It would be a lot nicer if ninja would actually allow u to use the original ones and just hack the way the enterlong entershort is performed.

Reply With Quote




Last Updated on April 30, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts