Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

assigning variable value??

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

    assigning variable value??

    SetProfitTarget("", CalculationMode.Price, Variable0);

    Variable0 =Position.AvgPrice+.0050;

    its not calculating the operation i assigned it just taking the value .0050 and excuting..

    i need to get the EnterLong price then adding 0.0050 to the Long price and assign the sum to Variable0

    pls hlp

    #2
    Deall, I would then not use .Price mode here, but .Ticks - then just enter your target value in ticks and you should be good. That would be the easiest way to realize this setup.

    Comment


      #3
      how to round of the tick size corresponding to the price value using this < Instrument.MasterInstrument.Round2TickSize(double price); > syntax and how to define it in the script

      Comment


        #4
        In which context do you seek to apply it? You would just pass in your double value you would like to see rounded 2 ticksize.

        So for example to plot a rounded SMA value you could do -

        Plot0.Set(Instrument.MasterInstrument.Round2TickSi ze(SMA(20)[0]));

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, Yesterday, 10:06 AM
        0 responses
        22 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        19 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        14 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        10 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        41 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X