fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    How to add StopLoss using custom indicator Prices

    Questions & Answers
    2
    3
    1007
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mpantogi last edited by fxDreema

      Hello,

      I am newbie here and i have few days start using fxDeema to create my EA.

      This is the most difficult part for my EA i thing.They way to calculate my stop loss

      I have a custom indicator which gives me that trendlines objects on the chart.D-hi, D-low ,D-open, D- PP, D- R1, D-R2, D-R3, D-S1, D-S2, D-S3(PIVOT POINT lines).

      I need two variables, a and b.

      If cur. is EUY/USD a=80,if cur. is EUR/YEN a=100....... if cur. is GBP/CHF a =60

      If current_Price - D-PP > a
      { b= current_Price - D-PP + 10)
      else If current_Price - D-R2 > a
      { b= current_Price - D-PP + 10).......
      .....else if current_Price - D-S2 > a
      { b= current_Price - D-S2+ 10)
      

      On BUY NOW make stopLoss=b

      I will appreciate any help.

      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        I don't know, it looks that all of this is to be put in a custom block đŸ™‚ The situation looks to special to be handled by the system blocks

        1 Reply Last reply Reply Quote 0
        • M
          mpantogi last edited by

          Ok, so let's say that i write the code in the custom block,which i want to return me the variable b = stopLoss.

          1.In the BUY NOW/SELL NOW i have that options No Stop-loss,Fixed pips, % of take - profit, custom(price level), custom(pips), custom(price fraction).How can i use variable b as stopLoss?

          2.Also the trendline objects in my chart D-hi, D-low ,D-open, D- PP, D- R1, D-R2, D-R3, D-S1, D-S2, D-S3 have specific prices,but there are no static,may change day to day.Writing only the nameS should read the prices which they have or should i do something more?

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          Online Users

          A
          P
          I
          G
          M
          M
          J
          T
          S
          T
          M
          O
          R
          E
          P
          B
          G

          38
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors