Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Looking for a tutorial on how to manipulate indicators to create a new indicator
Collapse
X
-
Well, my entries each have a lot of criteria to be set before a trade is triggered.Originally posted by NinjaTrader_Bertrand View PostOk, if your exit is then the logical reverse of conditions you would need to code those out as well and provide different arrow placement and tags to signify them.
ALL my exits for a BUY signal are just going to be plotted by:
For an exit of a SELL signal, that value above would be +1. But this condition is EVERYWHERE as that value is switching from -1 to 1 all the time. How do I make this signal occur for each entry signal that occurs, and NOT every time that value changes.Code:if(ERG_Trade().HISTSlope[1] == -1 ) { Then plot exit }
In other words, I only want to plot the exit signal if a trade entry was plotted.
Comment
-
I created the condition and it worked. Problem is that I have to do this for every individual trade scenario I have, and there are over 200 of them.
Here is the code snippet. I added that flag I spoke of above, so that it only triggers AFTER the entry condition is satisfied.
Code:if(ERG_Trade().Ltsx[0] == 1 && ERG_Str1().HISTSlope[0] == 1 && ERG_Trade().HIST[0] >= 10 ) { if(ERG_Trade().HISTSlope[1] == 1 && ERG_Trade().HISTSlope[2] == 1 && ERG_Trade().HISTSlope[3] == -1) { DrawArrowUp("arrow"+CurrentBar, true, 0, Low[0]-12*TickSize, Color.Green); DrawText("text0"+CurrentBar, ""+Open.ToString(), 0, Low[0]-30*TickSize, Color.Black); DrawText("text1"+CurrentBar ,"1a_A", 0, Low[0]-38*TickSize, Color.Black); [COLOR="blue"]inTrade_1a_A = 1;[/COLOR] } [COLOR="Blue"]if(inTrade_1a_A == 1 && ERG_Trade().HISTSlope[1] == -1) { DrawArrowDown("arrow"+CurrentBar, true, 0, High[0]+12*TickSize, Color.Black); DrawText("text2"+CurrentBar, ""+Open.ToString(), 0, High[0]+30*TickSize, Color.Black); inTrade_1a_A = 0; }[/COLOR] }
Comment
-
Great - it will depend on your trade management logic how your further structure it and if you would like to keep track individually of which entries triggered or if all entries should be treated equally so that they all set / reset the same flag. In a strategy this would be determined by the Entry signal names applied, so the managed order submission approach would act as a filter (EntryHandling / EntriesPerDirection).
Comment
-
Right now I'll define individual flags for everything, as I want to be sure all the positions can be entered and exited properly.Originally posted by NinjaTrader_Bertrand View PostGreat - it will depend on your trade management logic how your further structure it and if you would like to keep track individually of which entries triggered or if all entries should be treated equally so that they all set / reset the same flag. In a strategy this would be determined by the Entry signal names applied, so the managed order submission approach would act as a filter (EntryHandling / EntriesPerDirection).
Heres a strategy question, I want to eventually create a strategy with this indicator, and as you see on the pictures, I have a bunch of individual setups. Actually, similiar setups, but I labeled them differently based on where the oscilator was at the time of entry. That's why I have so many trade definitions. I kept them so segmented as I wanted to be able to test them all INDIVIDUALLY.
Is there a way I can test all of these simultaneously, and have the report give me statistics on each setup I have defined individually? So that I don't have to go into my script, and individually toggle which ones I want to test?
Comment
-
I see when you use the EnterLong() command in a strategy, there is a "signalName" parameter there. Does this accomplish what I want, or is this just a label just for visual reference on the chart?Originally posted by forrestang View Post
Is there a way I can test all of these simultaneously, and have the report give me statistics on each setup I have defined individually? So that I don't have to go into my script, and individually toggle which ones I want to test?
Comment
-
All the trades will have their individual unique signal names.Originally posted by NinjaTrader_Bertrand View PostYou could assign different signal names for each entry and then choose to set the EntryHandling to use unique entry names, but the reported statistics for the symbol would be involved all setups that triggered.
So what EntryHandling will do for me is just allow me to individually toggle which trades are taken?
Is this what you were referring to:
Comment
-
Do you mean how one can toggle which trades in the option menu when you add an indicator to a chart?Originally posted by NinjaTrader_Bertrand View PostThere is no toggling inbuild, it would take positions in one direction then up to the set entryhandling. You could add user inputs that lets you set which set of entries to use at runtime in the UI.
Do you have the reference link for that?
Comment
-
forrestang, send me a PM if you still have questions about the indicator you are calling. I believe I wrote it...
Just a suggestions, when checking direction (Slope) use >0 or <0 comparisons rather than ==1 or == -1 ... the logic was designed with that mindset.
I am also working on a calling indicator and writing up the Prof's Office strategy.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
599 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
344 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
558 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
557 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment