2) You would need to debug your strategy. The SamplMACrossover strategy is reference you can use. If this strategy doubled up on a cross, then there likely is a problem on our end.
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
New User Woes
Collapse
X
-
Thank you ninja ray, you have been an unbeleivable help in the learning curve.
A few more
Is there a way to stop a strategy at acertain gain or loss
IE with strategy runner i used to have, I could stop the days trading at a certain loss or gain on the whole day. Like if i made 500 it will stop all trading etc.
Thanks again for all the help guys and gals, and yes i am diggin through the forums etc trying to find my answers also.
Tim
Comment
-
Yes this is possible but you would have to program it.
Here is a reference sample - http://www.ninjatrader-support.com/v...ead.php?t=4084RayNinjaTrader Customer Service
Comment
-
Thank you I read the code and uderstand what it does and what you are saying.
the only question i have is with the code:
/* Prevents further trading if the current session's realized profit exceeds $1000 or if realized losses exceed $400.
Also prevent trading if 10 trades have already been made in this session. */
if (Performance.AllTrades.TradesPerformance.Currency. CumProfit - priorTradesCumProfit >= 1000
|| Performance.AllTrades.TradesPerformance.Currency.C umProfit - priorTradesCumProfit <= -400
|| Performance.AllTrades.Count - priorTradesCount > 10)
I would assume current session would be the day, or say I turned the program on then shut down and turned back on later in the day, Would this reset or is it a timeframe like 24 hr period??
Thanks again, I cant belive the help I have gotten
You guys deserve soem gratitude to all us newbies on the paltform.
Comment
-
Performance stats are based on the life of the strategy. If in the reference sample trades were only taken on real-time data (not historical) then it would refer to the entire time the strategy was running. Meaning, once it reached these PnL levels.
You will really have to dig in your self and code/test to get a better understanding of how all this works.RayNinjaTrader Customer Service
Comment
-
MACD Strategy Wizard
Can i do a MACD strategy in the wizard or only code??
what i want is the cross of the lines.
And i realize dumb questions, probably from staring at ninja all day, but which line is what. I think the purple is the signal and the green the macd.
Mainly what do i use in the wizard to show the cross. it seems to have the whole macd cross the whole macd.
Thanks
Tim
Comment
-
Really gettin things goin now, Few more questions:
1) I attempted to use the"bars since exit" > 4 in the wizard and it basically shut down my system and created no trades in the backtest.
What i wanted was that after a trade it must wait so many bars to make it look for another trade.
2) I am still having trouble with it going short 2 contracts instead of 1. It seems that when it sells the first to close posisiton it sells, then goes short another. Either that or it is not realizeing it exited the long, So it then goes short one contract with the exit long , and anohter with the enter short.
3) Under the set 1 i have the long entry, set 2 the long exit, set3 the short entry, set4 the short exit, The long exit and short entry are the same criteria so maybe this is leading to my issues. Would it be better to have two seperate strategies running, 1 for long and 1 for short?? so it wont get confused inside the same strategy. I figure if i can get the bars since exit working it may fix this issue also.
Tim
Comment
-
When two strategies are running does NT know the difference between the two, or will it get confused betweent he different trades.
Is there a way to have ti enter when a cross cross by so much?? IE to eliminate the touches that cause a bad signal.
Thanks again tim
Comment
-
Thank you again ninja ray.
But what about my double shorts? Do you think it is my strategy??
I will continue to strive to get the kinks worked out.
Thank you all for the help
So far the strategy has gained 8 points today on the ES with no loss yet, so i must be doing something right.
Thanks for helping with all the kiinks
Tim
Comment
-
Ok will work on that,
What about the code in the wizard for "bars since exit"
i chose that then ">" then "4"
it was my feeling that if more than 4 bars have passed since exit it is allowed to trade again.
When i put that criteria and bactested it no long traded, as in no trades happened compared to like 400 trades without it.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Waxavi, 04-19-2024, 02:10 AM
|
2 responses
37 views
0 likes
|
Last Post
by poeds
Today, 06:37 AM
|
||
Started by chbruno, Yesterday, 04:10 PM
|
1 response
44 views
0 likes
|
Last Post Today, 06:36 AM | ||
Started by Max238, Today, 01:28 AM
|
1 response
24 views
0 likes
|
Last Post
by CactusMan
Today, 06:18 AM
|
||
Started by giulyko00, Yesterday, 12:03 PM
|
2 responses
10 views
0 likes
|
Last Post
by giulyko00
Today, 06:11 AM
|
||
Started by r68cervera, Today, 05:29 AM
|
0 responses
4 views
0 likes
|
Last Post
by r68cervera
Today, 05:29 AM
|
Comment