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
Fractal Indicator
Collapse
X
-
Interesting.
Can your post what you tried?
It would be easier for me to fix your code, rather than code it from scratch.
thanks.
Originally posted by ssijbabu View PostHi All,
I am new to ninjatrader and i need a fractal indicator. I tried programming but i am unable to create a proper one. can someone try this?
Here is a document on fractal and a sample code.
1)Whatis fractal?
Fractal The Fractal indicator is available in the “Opening point of the position” and “Closing point of the position” slots of Forex Strategy Builder. Its source code is published in Fractal Source Code Internet page. If you have any questions concerning the
2) Sample Code
Fractals (Page 1) — Technical Indicators — Forex Software — Create and Test Forex Strategies
Regards
Sujay
-
Originally posted by NinjaTrader_Bertrand View PostWelcome to our forums here Sujay, did you look already into the Fractals indicators offered in our sharing section on these forums?
http://www.ninjatrader.com/support/f...fractal&desc=1
Hi NinjaTrader_Bertrand,
I checked the code of bwFractals? is it identifying all the 7 patterns?
Comment
-
Sorry would not be too familiar with both scripts you compare - however the fractal shared on our forums appears to be looking for the regular pivot pattern and up to 4 matching highs / lows to identify the fractal, I believe this comes very close to what you look for. Best would be comparing outcomes generated on your instruments / timeframes of interest.BertrandNinjaTrader Customer Service
Comment
-
Originally posted by sledge View PostInteresting.
Can your post what you tried?
It would be easier for me to fix your code, rather than code it from scratch.
thanks.
Here is the code i tried. Only the upper Fractal line is coaded.
Regards,
SujayAttached Files
Comment
-
Originally posted by ssijbabu View PostHi sledge,
Here is the code i tried. Only the upper Fractal line is coaded.
Regards,
Sujay
Once that is corrected, your code actually looks correct, but we can always do a review at that time, if you are still having issues.
Comment
-
Hi All,
I finally completed the indicator. Thanks to all for you help.
Now i need to build a strategy using this.
Strategy 1:
Enter:
Enter long when the price cross upper line or short when the price cross lower line.
Exit:
At the end of the day (close price of the day).
Strategy 2:
Enter:
Enter long when the price cross upper line or short when the price cross lower line.
Exit: (Fixed Stop Loss or Take Profit)
When the price hits stop loss or take profit exit it.
Regards,
SujayAttached Files
Comment
-
Originally posted by ssijbabu View PostHi All,
I finally completed the indicator. Thanks to all for you help.
Now i need to build a strategy using this.
Strategy 1:
Enter:
Enter long when the price cross upper line or short when the price cross lower line.
Exit:
At the end of the day (close price of the day).
Strategy 2:
Enter:
Enter long when the price cross upper line or short when the price cross lower line.
Exit: (Fixed Stop Loss or Take Profit)
When the price hits stop loss or take profit exit it.
Regards,
Sujay
IOW, use if ... else instead of if ... if.
This is especially true because you have already coded your pattern from the simplest to the most complex. You might as well exit as soon as you get the simplest pattern-match.
Last edited by koganam; 10-05-2012, 12:30 PM.
Comment
-
Originally posted by koganam View PostNicely written, but you can make processing more efficient, if you exit after any one fractal pattern is met, instead of testing every pattern on every tick. Yikes .
IOW, use if ... else instead of if ... if.
This is especially true because you have already coded your pattern from the simplest to the most complex. You might as well exit as soon as you get the simplest pattern-match.
Its Done. Here is the updated one.Attached Files
Comment
-
Hi is their an Fractal indicator for NinjaTrader 8? I tried this version but this seems not compatible for NT8.
Comment
-
One variant of this study was ported to NinjaTrader 8 and could be found in our sharing under this link - http://ninjatrader.com/support/forum...d=7&linkid=713BertrandNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Barry Milan, Yesterday, 10:35 PM
|
5 responses
16 views
0 likes
|
Last Post Today, 05:37 PM | ||
Started by DanielSanMartin, Yesterday, 02:37 PM
|
2 responses
13 views
0 likes
|
Last Post Today, 05:26 PM | ||
Started by DJ888, 04-16-2024, 06:09 PM
|
4 responses
13 views
0 likes
|
Last Post
by DJ888
Today, 04:28 PM
|
||
Started by terofs, Today, 04:18 PM
|
0 responses
12 views
0 likes
|
Last Post
by terofs
Today, 04:18 PM
|
||
Started by nandhumca, Today, 03:41 PM
|
0 responses
8 views
0 likes
|
Last Post
by nandhumca
Today, 03:41 PM
|
Comment