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
Looking for a tutorial on how to manipulate indicators to create a new indicator
Collapse
X
-
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:
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).BertrandNinjaTrader Customer Service
Comment
-
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
-
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
-
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
-
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 geddyisodin, Today, 05:20 AM
|
5 responses
32 views
0 likes
|
Last Post Today, 11:39 AM | ||
Started by bmartz, Today, 09:30 AM
|
2 responses
12 views
0 likes
|
Last Post
by bltdavid
Today, 11:24 AM
|
||
Started by f.saeidi, Today, 11:02 AM
|
1 response
4 views
0 likes
|
Last Post Today, 11:08 AM | ||
Started by geotrades1, Today, 10:02 AM
|
4 responses
12 views
0 likes
|
Last Post
by geotrades1
Today, 11:08 AM
|
||
Started by rajendrasubedi2023, Today, 09:50 AM
|
3 responses
16 views
0 likes
|
Last Post Today, 10:57 AM |
Comment