fxDreema

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

    Need help for ea envelope

    Questions & Answers
    2
    3
    785
    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.
    • L
      Lazar last edited by Lazar

      Guys can someone help me i totally messed up somewhere in my project. Ea doesn't open orders, and i cannot see where the problem is. Here is my project share:
      shared/hZ7Ns1v1b

      Idea is that EA trades on touching envelope lines.
      Buy conditions:
      Price touches lower red envelope needs to open buy order(market order)

      Sell Condition:
      Price touches upper Blue envelope line, ea opens sell order( market)

      Ea has trailing stop break even

      I want to choose type of order

      IN settings should be Choose Type f order Market or Stop order

      In case that market order is selected, order should be executed as soon as price touch line
      In case that Stop order is selected , as soon a Buy condition is met ea will place buy stop at x pips from current price, and if Sell condition is met ea should place Sell stop at x pips from price.

      Spread control...dont send order if maximum spread is bigger then x.

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

        When you are using == to compare two prices, don't forget that the price of everything (candles, indicators) depends on the ticks, but those ticks are coming when they want and the Ask/Bid price is always different. So it's practically wrong to use ==, because you will most likely miss the exact price, and you can miss the price with 0.00001 difference. Simply don't use == to compare prices, use anything else. Use == to check exact values, for example to check whether something is 1 or 0, or some other known value.

        1 Reply Last reply Reply Quote 0
        • L
          Lazar last edited by

          Thanks, maybe its better to use candle body then price

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

          Online Users

          A
          K
          R
          M
          V
          E
          T
          F
          J
          K
          M

          18
          Online

          146.8k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors