NexusFi: Find Your Edge


Home Menu

 





Live strategy broken


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one kidvic with 4 posts (0 thanks)
    2. looks_two rleplae with 3 posts (0 thanks)
    3. looks_3 sam028 with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 1,927 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 8 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
kidvic
Los Angeles, CA
 
Posts: 92 since Mar 2015
Thanks Given: 13
Thanks Received: 3

Hi,

I have a script that was working beautifully in market replay as soon as I go live, it malfunctions.

It enters 2 short liimits or 2 long limits at certain market conditions.

I have setstoploss and setprofittarget on the script, but heres the problem: it doesnt always place them there!

I have seen that on some instruments, it will do it, then on some it won't.

Like I said, the problem is when live!, why?

Please help!


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Iran Ceasefire Surges to 19.5% on US 15-Point Plan -- 82 …
Prediction Markets & Event Contracts
Penalties in Budapest, Peace Deadline in Tehran: Arsenal …
Prediction Markets & Event Contracts
Trump Truth Social Fires Hormuz From 10% to 59% -- Arsen …
Prediction Markets & Event Contracts
Topstep Acquires The Futures Desk -- Prop Firm Consolida …
Funded Trading Evaluation Firms
Tradeify 3.0 Overhauls Futures Prop Firm Model -- One-Ti …
Funded Trading Evaluation Firms
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,756 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,632



kidvic View Post
Hi,

I have a script that was working beautifully in market replay as soon as I go live, it malfunctions.

It enters 2 short liimits or 2 long limits at certain market conditions.

I have setstoploss and setprofittarget on the script, but heres the problem: it doesnt always place them there!

I have seen that on some instruments, it will do it, then on some it won't.

Like I said, the problem is when live!, why?

Please help!

Without the code it's impossible to say what's wrong.
You may add some Print() for debugging purposes and see what are the values of the stop/target.


Success requires no deodorant! (Sun Tzu)
Follow me on X Reply With Quote
  #4 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 2,947 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,860

Is there anything in the log ?
Do you get any error condition back ?

It could be rejected by the broker upon certain conditions, what broker are you using ?

Do you have a concrete example ?


Follow me on X Visit my NexusFi Trade Journal Reply With Quote
  #5 (permalink)
kidvic
Los Angeles, CA
 
Posts: 92 since Mar 2015
Thanks Given: 13
Thanks Received: 3


rleplae View Post
Is there anything in the log ?
Do you get any error condition back ?

It could be rejected by the broker upon certain conditions, what broker are you using ?

Do you have a concrete example ?

I use AMP.
It's really bizzare.
I used to have it with entries per direction = 2, yet it would put more instances, (mind you, when it entered 4, it actually placed apprppriate stops and profits) (even tho my strategy enters 2 per direction)
Im using Iorders, liveuntil cancelled.
I made the stop and takeprofit so they get created when market position is long or short ( because I thought they were entering too soon before the entry was triggered)

things that I think might be at issue:
I have set it to historical to return, (so it only takes new trades)
I have taken the entries per direction off( this helped as I only see 2 orders at a time now, but this doesnt make sense)
I have entryhandling to uniqueentries
I have also realtime errorhandling to take no action (my script automatically closes an order if it encounters a problem)

the things that I think might be the issue, could be the issue, but I've manipulated them in different variations, yet it still only seems to work with some instruments and not on others. This is what i find puzzling.


Reply With Quote
  #6 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 2,947 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,860


kidvic View Post
I use AMP.
It's really bizzare.
I used to have it with entries per direction = 2, yet it would put more instances, (mind you, when it entered 4, it actually placed apprppriate stops and profits) (even tho my strategy enters 2 per direction)
Im using Iorders, liveuntil cancelled.
I made the stop and takeprofit so they get created when market position is long or short ( because I thought they were entering too soon before the entry was triggered)

things that I think might be at issue:
I have set it to historical to return, (so it only takes new trades)
I have taken the entries per direction off( this helped as I only see 2 orders at a time now, but this doesnt make sense)
I have entryhandling to uniqueentries
I have also realtime errorhandling to take no action (my script automatically closes an order if it encounters a problem)

the things that I think might be the issue, could be the issue, but I've manipulated them in different variations, yet it still only seems to work with some instruments and not on others. This is what i find puzzling.

do you get a return error code ?
anything in the log file ?


Follow me on X Visit my NexusFi Trade Journal Reply With Quote
  #7 (permalink)
kidvic
Los Angeles, CA
 
Posts: 92 since Mar 2015
Thanks Given: 13
Thanks Received: 3


rleplae View Post
do you get a return error code ?
anything in the log file ?

it seems as though it canels, or rejects them. they pop up in the orders then go away.


Reply With Quote
  #8 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 2,947 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,860


kidvic View Post
it seems as though it canels, or rejects them. they pop up in the orders then go away.

Have you studied the trace file ?
~document\ninjatrader 7\trace

This could give you a clue of what is happening.. if the broker is rejecting it


Follow me on X Visit my NexusFi Trade Journal Reply With Quote
  #9 (permalink)
kidvic
Los Angeles, CA
 
Posts: 92 since Mar 2015
Thanks Given: 13
Thanks Received: 3


rleplae View Post
Have you studied the trace file ?
~document\ninjatrader 7\trace

This could give you a clue of what is happening.. if the broker is rejecting it

Thanks for that, I tihink ill seperate the long and the short, you have always been very helpful.


Reply With Quote




Last Updated on August 13, 2016


© 2026 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 - Downloads - Top
no new posts