fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. dani17
    3. Topics
    D
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 8
    • Best 0
    • Controversial 0
    • Groups 0

    Topics created by dani17

    • D

      Pending Order
      Questions & Answers • • dani17

      4
      0
      Votes
      4
      Posts
      581
      Views

      fxDreema

      I don't understand sentences without commas even in my native language. Some screenshot? Or at least tell me how things must happen in steps, like this:

      Step 1 - Open Buy pending order...
      Step 2 - When the price is... do this...
      Step 3 - Something else...

    • D

      EA for example
      Questions & Answers • • dani17

      4
      0
      Votes
      4
      Posts
      829
      Views

      fxDreema

      I can see your projects even without sharing 🙂

      You need to buy and sell, this is forex after all. The question is when and how much to buy and sell. But there is no one rule for that. Someone may want to trade on each candle. Other may want to trade once a day, when some condition happens. Other may want to buy when conditions reverse. Other may want to have 1 trade all the time.

      EAs are working on events. Certain part of the code is executed... sometimes, on a given event. The most important event is the "Tick" event. When a new tick comes, MetaTrader causes this part of the code to run. As you can suggest, all blocks under "on Tick" are running on every tick. Your block 59 is running once for every tick. Blocks below... depending on the block/s above.

      Remove that block "AND", it's not needed, it's the same without it.

      Your strategy is now like this:

      When a tick is received, check how many trades there are If there are 0 trades, check if RSI is above 50, otherwise stop here and wait for the next tick. Check if the server time is between 8:00 and 20:00. If not, stop here and wait for the next tick. Create Buy trade. That's all.

      On the next tick everything will be the same. But when you finally create a new Buy trade, 1) will not pass anymore. When your Buy trade is closed for whatever reason, 1) will pass again.... until you got another Buy trade.

      As I already said, if you want to limit the number of trades by time, add some block like "Once per bar" or "Once a day". There are other scenarios as well, this is the most simple.

    • D

      Script to modifi TT and SL
      Questions & Answers • • dani17

      6
      0
      Votes
      6
      Posts
      1065
      Views

      fxDreema

      No, this is how MetaTrader works and call things. They have 3 types of programs - Expert Advisors, Scripts and Indicators 🙂

    • 1 / 1