Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
unexpected/unwanted trades + Set methods
Collapse
X
-
Hi Amedeus, thanks for posting this.
The obvious problem from the screen shot is there are only two entries yet it looks like there are profit targets set, so there is something wrong with the entry quantities or order handling in the strategy. What data feed are you using to run the strategy? Can you send me a reduced example to scriptingsupport at ninjatrader.com, referencing "Attn ChrisL 3327115" in the body of the email?
Best regards,
-ChrisL
-
hey Chris, thank you,
I can provide some of it.
The methods are called like this :
Code:protected override void OnStateChange() { ... else if (State == State.DataLoaded) { someComboz_SetStopTarget(); } } private void someComboz_SetStopTarget() { SetStopLoss("someComboa", CalculationMode.Ticks, someInta, false); SetStopLoss("someCombob", CalculationMode.Ticks, someInta, false); SetStopLoss("someComboc", CalculationMode.Ticks, someInta, false); SetProfitTarget("someComboa", CalculationMode.Ticks, someIntb); SetProfitTarget("someCombob", CalculationMode.Ticks, someIntb); SetProfitTarget("someComboc", CalculationMode.Ticks, someIntb); }
and the finder cannot find : "Profit Target"
What better detail could I provide ?Last edited by Amedeus; 10-27-2021, 10:15 AM.
Leave a comment:
-
Hello Amedeus, thanks for writing in.
It looks like a signal "Profit Target" is creating the short position. I can not tell what is causing this from the screen shot. Can you provide some details about the strategy?
Best regards,
-ChrisL
Leave a comment:
-
unexpected/unwanted trades + Set methods
Hi everyone,
I have an issue with a strategy :
at some point, from time to time, when running real time, the strategy starts to take unexpected trades as the short in the attached picture.
there is no short in this piece of script, yet at the end of the long, it enters for a short.
this is using the SetStopLoss(); and SetProfitTarget(); methods.
Has anyone a clue as why this is doing this ? or what to look for in order to know the why and correct it ?Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by spottysallrite, Today, 11:31 AM
|
0 responses
2 views
0 likes
|
Last Post Today, 11:31 AM | ||
Started by johnMoss, 03-04-2024, 01:53 PM
|
2 responses
31 views
0 likes
|
Last Post
by Overnhou
Today, 11:21 AM
|
||
Started by Padan, Today, 02:02 AM
|
5 responses
17 views
0 likes
|
Last Post Today, 11:14 AM | ||
Started by Lele2k24, Yesterday, 11:24 AM
|
8 responses
28 views
0 likes
|
Last Post
by Lele2k24
Today, 11:00 AM
|
||
Started by kramnor2001, Yesterday, 02:30 PM
|
4 responses
24 views
0 likes
|
Last Post
by bltdavid
Today, 10:44 AM
|
Leave a comment: