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

Don't laugh...

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

    Don't laugh...

    I want my 'SELL' buttons to gray out and become inactive when my 50 SMA is angled up... and my 'BUY' buttons to be grayed out and inactive when it's angled down.

    Anyone?

    #2
    Hi 5iver, unfortunately it's not supported to custom configure those.

    But you could print some text on the chart like 'Take Buy Signals' with DrawTextFixed on your MA condition.

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks Bertrand,

      I've got it working in the simplest form. Could you help me with the "Font" type? What is the required syntax for the "Font" in:

      DrawTextFixed(string tag, string text, TextPosition textPosition, Color textColor, Font font, Color outlineColor, Color backColor, int opacity)

      And is there any way to specify an X/Y pixel offset from the chosen TextPosition?

      Many thanks.

      Comment


        #4
        Hi, either you do really simplistic and use this overload -
        Code:
        [SIZE=2][SIZE=2]DrawTextFixed([/SIZE][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]"myText"[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2], [/SIZE][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]"GoLongPermission"[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2], TextPosition.TopRight);
        [/SIZE][/SIZE]
        For the full overload with the font parameter, you can create a font variable
        Code:
        [SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]private[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2] Font myFont = [/SIZE][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2] Font([/SIZE][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]"Arial"[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2], 10[/SIZE][/SIZE][SIZE=2][SIZE=2]);
        [/SIZE][/SIZE]
        and use this in the syntax you posted...
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Hi 5iver,


          I like your problem! trading is discipline and you are trying to discipline yourself by software. Certainly helpful and I am also doing the same, but in the long term discipline must come from your deepest inner self. Even if you are exhausted, tired, 5 losses in a row you should stick to discipline. But in those circumstancs your deepest self will rule your behaviour and if it finds something against its will then it will find ways to turn on disabled buttons and to execute or exit the trade.

          So much to disabling trade buttons.

          If you are not disciplined then why don't you shut down your PC?

          Best regards

          Andreas

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by mattbsea, Today, 05:44 PM
          0 responses
          3 views
          0 likes
          Last Post mattbsea  
          Started by RideMe, 04-07-2024, 04:54 PM
          6 responses
          31 views
          0 likes
          Last Post RideMe
          by RideMe
           
          Started by tkaboris, Today, 05:13 PM
          0 responses
          2 views
          0 likes
          Last Post tkaboris  
          Started by GussJ, 03-04-2020, 03:11 PM
          16 responses
          3,282 views
          0 likes
          Last Post Leafcutter  
          Started by WHICKED, Today, 12:45 PM
          2 responses
          20 views
          0 likes
          Last Post WHICKED
          by WHICKED
           
          Working...
          X