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
Fisher Transform
Collapse
X
-
Hello pworroll,
Thanks for your post and welcome to the forums.
Looks like you would want to evaluate the (Fisher transform level) of 2 bars ago to the previous bar to find if 2 bars ago was less than 1 ago and then assess the value of the current bar to the previous looking for the current bar to be less than the previous bar. So meeting those conditions means the previous bar was the high between 2 bars ago and the current bar.
Since the Fisher transform is an oscillator to effectively check for those conditions you would want to look at the absolute values at each bar.
Once you find that condition you could then issue an alert message to the alert window which could include a sound as needed.
Please let me know if I can be of further assistance.Paul H.NinjaTrader Customer Service
-
Fisher Transform
Thank you Paul. I understand the logic as you describe and what you state is exactly what I require. I now understand that one has to have more than just one value to determine a change in direction or a "lower high"
I however am still not quite sure how to write this to be able to set the alertt - might you be able to help.
Comment
-
Hello pworroll,
Thanks for your reply.
Here is the code section to evaluate for the condition:
if (Math.Abs(Value[1]) > Math.Abs(Value[2]) && Math.Abs(Value[0]) < Math.Abs(Value[1]))
{
//Do your alert thing in here, also, if you want:
DrawDot("tag1"+CurrentBar, true, 0, Value[0], Color.Red); // put dot on histogram bar meeting condition
}
Note: if you choose to use the drawdot you will need to add in initialize section: DrawOnPricePanel = false;
Please let me know if I can be of further assistance.Paul H.NinjaTrader Customer Service
Comment
-
Hello pworroll,
Attached is a courtesy copy of what I put together on the Fishertransform. I added the lines of code listed in the prior post and also added a playsound statement. You can edit the file to change the sound if you wish. No warranty is expressed or implied, further code changes would be on you. I also added a picture of what the output looks like.
The file is FtranformExample, the indicator is Ftransform.
Once Downloaded, you may import the indicator by:
From the Control Center window select the menu File > Utilities > Import NinjaScript to open the Import NinjaScript dialog window
Select the file you want to import
Press the "Open" button
Once installed, you may add the indicator to a chart by:
Right click you chart > indicators > Select the Indicator from the list on the left > New > OK
Please let me know if I can be of further assistance.Paul H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ninza33, Today, 09:10 AM
|
1 response
10 views
0 likes
|
Last Post Today, 09:46 AM | ||
Started by goodknight777, Today, 08:43 AM
|
1 response
5 views
0 likes
|
Last Post Today, 09:25 AM | ||
Started by kramnor2001, Yesterday, 02:30 PM
|
3 responses
21 views
0 likes
|
Last Post
by kramnor2001
Today, 09:20 AM
|
||
Started by Padan, Today, 02:02 AM
|
3 responses
11 views
0 likes
|
Last Post Today, 08:54 AM | ||
Started by Tim-c, Today, 08:36 AM
|
1 response
3 views
0 likes
|
Last Post Today, 08:45 AM |
Comment