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!
See more
See less

Partner 728x90

Collapse

Macd cross arrows on price panel and hide macd

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • forextrader2003
    replied
    Thank all of your for your responses.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello forextrader2003,

    While our NinjaTrader Support is not able to create, debug, or modify, code or logic for our clients, this thread will remain open for any community members that would like to make these modifications as a convenience to you.

    You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.


    That said, I am happy to answer any questions you may have about NinjaScript if you decide to code this yourself.

    In the condition set that draws the up arrow, you could add a condition that the myMACD.Default[0] is greater than 0. And for the condition set that draws the down arrow require myMACD.Default[0] to be less than 0.

    Leave a comment:


  • forextrader2003
    replied
    Hello,

    I have searched the internet high and low for a modification to the below indicator, one that has the option to only show buy arrows above the zero line and only sell arrows below the zero line, would it be possible for someone here to make this modification for me, it would greatly be appreciated.

    Thank You !!!
    Attached Files

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello sukhob,

    Use prints to find out if the condition to draw the object is evaluating as true. (Or if the else that removes the object is evaluating as true)

    Below is a link to a forum post that demonstrates using prints to understand behavior.


    Please include the output from the prints and the code of the print and I will be happy to assist in analyzing the output and the behavior.

    As a test, you could try drawing the arrows outside of the condition to ensure they are drawing as expected. This would also point to the condition that draws the objects as the issue.

    Leave a comment:


  • sukhob
    replied
    I tried to use the above code but it doesn't display any arrow whenever the slow MA crosses above/below zeroline. I am attaching the code file. What am I doing wrong here?
    Attached Files

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello sukhob,

    With CrossAbove() / CrossBelow() you can supply a double value.

    CrossAbove(IDataSeries series1, double value, int lookBackPeriod)

    Below is a link to the help guide.
    https://ninjatrader.com/support/help...crossabove.htm

    Leave a comment:


  • sukhob
    replied
    I like the coding for the cross of slow & fast of MACD signals and displaying arrows. But instead of cross of slow & fast MA I would like to display in Price Panel the blue arrow whenever the slow MA line cross the zero line from below and red arrow whenever the slow MA line cross the zero line from above. It will be greatly appreciated if you can help me coding this for NT7. Thanks.

    Leave a comment:


  • trader333
    replied
    Bertrand
    Thanks it worked.

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    trader333, I've changed your code a bit up as a courtesy to plot the MACD arrows at price based values and not based on the MACD price itself, further I have removed the 0 line.

    This should now draw as you expected and not show any plots, but only the MACD signals on price.
    Attached Files

    Leave a comment:


  • trader333
    replied
    did'nt work. I have tried your suggestions. I have tried to display it in same as price input and panel#1, if I display it in panel #2, it would display indicator in new panel but no arrows. see screenshot
    Attached Files

    Leave a comment:


  • NinjaTrader_PatrickH
    replied
    Hello trader333,

    Thank you for your post.

    In the Initialize() method set the following:
    Code:
    			DrawOnPricePanel = true;
    			Overlay = true;
    For the Plot you would need to set it's color to Transparent.

    Leave a comment:


  • trader333
    started a topic Macd cross arrows on price panel and hide macd

    Macd cross arrows on price panel and hide macd

    I have attached macd indicaor which draws arrow on crossing of macd with its average. I want to hide macd in lower panel and draw arrows on price panel instead. Thanks for help
    Attached Files

Latest Posts

Collapse

Topics Statistics Last Post
Started by alifarahani, 04-19-2024, 09:40 AM
9 responses
54 views
0 likes
Last Post NinjaTrader_Jesse  
Started by mmckinnm, Today, 01:34 PM
2 responses
5 views
0 likes
Last Post mmckinnm  
Started by Conceptzx, 10-11-2022, 06:38 AM
3 responses
60 views
0 likes
Last Post NinjaTrader_SeanH  
Started by f.saeidi, Today, 01:32 PM
1 response
4 views
0 likes
Last Post NinjaTrader_Erick  
Started by traderqz, Today, 12:06 AM
9 responses
16 views
0 likes
Last Post NinjaTrader_Gaby  
Working...
X