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 frenkmly, Today, 04:49 AM
          0 responses
          4 views
          0 likes
          Last Post frenkmly  
          Started by ETFVoyageur, Yesterday, 07:05 PM
          2 responses
          18 views
          0 likes
          Last Post bltdavid  
          Started by MGHORBEL, 05-06-2024, 06:41 AM
          4 responses
          22 views
          0 likes
          Last Post MGHORBEL  
          Started by ChastiJose, Today, 03:37 AM
          0 responses
          7 views
          0 likes
          Last Post ChastiJose  
          Started by Klaus Hengher, Today, 03:13 AM
          0 responses
          11 views
          0 likes
          Last Post Klaus Hengher  
          Working...
          X