NexusFi: Find Your Edge


Home Menu

 





ninjatrader strategy dosent send all of my order to IB


Discussion in NinjaTrader

Updated
    1. trending_up 1,255 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

ninjatrader strategy dosent send all of my order to IB

  #1 (permalink)
barbi
israel
 
Posts: 2 since Feb 2015
Thanks Given: 0
Thanks Received: 0

Hi
i'm using the NT7 with an integration to IB broker, my code include's multiple entries (long) + take profit orders.
Every time i start the trading it implements the first buy(long) and i can see the take profit order at the IB pending's.
my problem is that every time that one of my other conditions filled and suppose to enter with an extra lots (long), that includes cases that i'm flat (without any position), it just dosen't get filled .
BTW when im doing disable and back to enable on the stock at the NT strategy, it does starting to work (when im flat)
does anyone has any idea what is the problem?
thanks

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
MC PL editor upgrade
MultiCharts
How to apply profiles
Traders Hideout
Exit Strategy
NinjaTrader
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
48 thanks
Just another trading journal: PA, Wyckoff & Trends
35 thanks
Tao te Trade: way of the WLD
25 thanks
Bigger Wins or Fewer Losses?
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
  #2 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


barbi View Post
Hi
i'm using the NT7 with an integration to IB broker, my code include's multiple entries (long) + take profit orders.
Every time i start the trading it implements the first buy(long) and i can see the take profit order at the IB pending's.
my problem is that every time that one of my other conditions filled and suppose to enter with an extra lots (long), that includes cases that i'm flat (without any position), it just dosen't get filled .
BTW when im doing disable and back to enable on the stock at the NT strategy, it does starting to work (when im flat)
does anyone has any idea what is the problem?
thanks

To understand the problem, you need to analyze the code of your strategy.

For example "EntriesPerDirection = 1" will not allow multiple entries.

Alternatively, additional entries may be ignored, if the margin requirements for multiple entries are not met.

Reply With Quote
Thanked by:
  #3 (permalink)
barbi
israel
 
Posts: 2 since Feb 2015
Thanks Given: 0
Thanks Received: 0


Hi
Thanks for your respond
I've analyzed my code and still haven't found the problem. the EnrtyPerDirection is fine ( more then 1)
and there's no problem with the margin requirements.
I tried everything' as far as i know, therefore I've added the structure of my code, in case that you'll recognized anything that i missed and
can cause a failure to enter more positions after entering the first one ( sometimes it does buys at the NT strategy but not at the BI platform)
thank's a lot !

protected override void Initialize()
{
EntriesPerDirection = 10;
EntryHandling = EntryHandling.AllEntries;
CalculateOnBarClose = true;
Add(VOL())
}


protected override void OnBarUpdate()
{
if (Position.MarketPosition == MarketPosition.Flat)
{

EnterLong(xsize, ""); // the size calculates
} By function


last_buy_price = Open[BarsSinceEntry()];// holds my last entering price for quantity calculation


if (Position.MarketPosition != MarketPosition.Flat&& //one more
condition)
{
// enter long again if all conditions are true
}
}


protected override void OnPositionUpdate(IPosition position)
{
if (position.MarketPosition == MarketPosition.Long)
{
//Take profit condition
}

Reply With Quote
  #4 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102

You would need to run the strategy and debug it for finding errors. Just a few code snippets do not allow to answer your questions.

Reply With Quote




Last Updated on March 15, 2015


© 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