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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        637 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        366 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        107 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        569 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        571 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X