fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. CPBonzo
    3. Posts
    C
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 77
    • Best 10
    • Controversial 0
    • Groups 0

    Posts made by CPBonzo

    • RE: moving average crossover method.

      @mrfilthy11 I see you have asked similar questions on other posts and that @ambrogio has already provided an example of how to adjust the value here: https://fxdreema.com/forum/topic/10174/moving-average-crossover

      posted in Questions & Answers
      C
      CPBonzo
    • RE: If at least 2 of 3 conditions are met..

      @equinox Value is correct in this box. In the box where you have written "sum", simply right-click and you will be presented with a list of your variables and constants.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: Lots of question-Stochastic Oscillatior

      I suggest you take a look at the "How To" and "Instructions" sections of the site and also the tutorials by users on the forum. Use the Forum search facility. There are lots of really useful posts about using the stochastic.

      However, some initial thoughts on your project:

      I'm unsure why you have the trailing stop block where it is. Place it on its own with a simple PASS block above it just so that it is connected to another block.

      The "no trade" block is connected such that if there is no trade the blocks on the left (connected to the orange tab) will pass, but those on the right only become active if there is a trade - the yellow tab passes if the condition, i.e. no trade, is false.

      Your first block on the left passes if the value of the Stochastic main line for the current candle is above the value of the stochastic main line when then candle before last closed. I'm unsure if that is what you are after.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: design expert

      Within the BUY and SELL blocks you can set which symbol (pair or instrument) to trade (leaving it blank defaults to the current symbol i.e. the chart on which the EA is running), so, in theory, yes, should you want to do so, you could up trades on all the pairs as long as you set a BUY or SELL block for each pair.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: moving average crossover method.

      The condition block has an option to adjust the value on each side of the condition. So, for example, you could have your faster MA on the left and the condition is that this is greater than the slower moving average on the right. The block works by comparing the value of the left side to the value of the right side.

      If in the adjust box for the right side you put +0.2 then 0.2 will be added to whatever the value is of the moving average at the specified point in time. If you put +2pips in the box it will add twice the pip value (which will depend on the instrument) to the value of the MA. For example, if the slower MA value at the previous candle time was 0.9031 and you have +2pips in the adjust box the value of that side of the condition becomes 0.9033. Therefore if you set the candle ID for both sides to 1 the condition block will pass if the value of the faster MA at the previous candle completion is greater than 0.9033 which is the value of the slower MA plus two pips.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: moving average crossover method.

      The question is impossible to answer unless you define exactly what you mean by "a lot". Do you mean the one moving average stays above the other for a defined number of candles, or it moves such that it is a defined number of pips, or other value, above the second moving average?
      When creating an EA I always find it useful to write out exactly what I expect it to do before I start the project. This helps me define exactly what blocks to use and how to use them. If you can't define exactly the action the EA should take it will be difficult, if not impossible, to write the code or create using fxDreema.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: If at least 2 of 3 conditions are met..

      Yes, if you set the candle id to 1 the value obtained will be that when the last completed candle closed.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: If at least 2 of 3 conditions are met..

      It is unclear from the EA you shared where the variable "sum" is adjusted such that it is the sum of the other variables. Also unclear why you are using the custom MQL block (which isn't doing what you think it is doing anyway) when the condition block could be used to compare the "sum" variable to a value.
      It is generally best to set the candle id to 1 (the previously completed candle) as the value during the current candle will change frequently.
      How are you re-setting the variables if conditions are no longer met?

      posted in Questions & Answers
      C
      CPBonzo
    • RE: HOW - William Percent R higher/lower than RSI?

      The range for William Percent R is normally 0 to -100 and that for the RSI 0 to +100. Therefore the value of the William Percent R is always going to be lower than the RSI value unless they are both at zero? That means the condition in the block you showed can never be met.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: Close partially gets triggered multiple times

      I would not interrupt the loop for each trade with the condition block. The condition is universal, i.e. the price crossed the dotted line will not be a different event for each trade, either the price has crossed the line or it has not. Therefore I would put this condition block at the top and then connect the "For each buy" block from the orange connector of the condition block, and then connect the other pink blocks below that.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: close

      When you say transactions, I assume you mean individual trades. The check profit block you are using checks the unrealised profit of all the open trades together. If I understand you correctly, you want to check each trade's unrealised profit/loss. In that case use the check loss block under the Loop for Trades & Orders section. You will only need three blocks (for each trade, check loss, close) to accomplish what I think you want to do.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: Pullback trading

      @l-andorrĂ  is correct, showing something visually helps only for context, but not producing the EA. For example, if you can't describe exactly why the support/resistance line is placed where it is you can't code it. The example you show isn't a horizontal line from the lowest low over the last X candles or the lowest close etc., so why draw it there. If it can't be explained it can't be coded. And that is just for drawing the line, without even considering what constitutes a pull-back.

      Whenever I start to write a new EA I will write out exactly what I want it to do in full and then translate that into fxDreema blocks. It is a lot easier than coding in MQL4 (or any other language) but the principles are the same - we have to be able to describe exactly what it is the programme is to do.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: Switching Between 2 EAs

      Why would you not combine the two EAs into a single EA, parts of which can be turned on or off as necessary?

      posted in Questions & Answers
      C
      CPBonzo
    • RE: EA doesn't trade signal

      When you say nothing happens, do you mean it doesn't close open trades? If you mean it doesn't open new trades that may be because there are no trades to close. The close trades block passes once its work is done. If it didn't close any trades, as there were none, I don't believe it will pass, so the Buy now and Sell now blocks never get triggered. Why not link both the Close and Sell now blocks to the Once per bar block and the same on the Buy side?

      posted in Questions & Answers
      C
      CPBonzo
    • RE: On-Off switch for Condition Block

      I would think the easiest way to do that is create a variable and then use a condition block such that if the variable is equal to a certain value it passes, otherwise it does not.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: Issues with Once per bar

      Place the "Once per bar" block between the Condition block and the other blocks. I'm unsure of the need to place it before the condition block as I assume it is the deleting of orders and creating of new orders that you want to only happen once per bar. If so, it doesn't matter how often the Condition block passes as long as the subsequent actions only happen once per bar.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: On-Off switch for Condition Block

      Why not create a button and, using the "check button state" block, set the condition block such that it only passes if the button is pressed? I use buttons on most of my EAs and find them very useful for turning functions on and off directly from within MT4. There is a good tutorial on using buttons by @miro1360 here: https://fxdreema.com/forum/topic/4184/tutorial-03-ema-cross-part-3-buttons-beginners

      posted in Questions & Answers
      C
      CPBonzo
    • RE: Trade is not switching please help Need to run Crossover EMA Strategy

      @parimal It is often useful to when reviewing blocks to write out the logic.
      In your example on the left-hand side block 1 will only pass if there are no trades of any sort. When the conditions in block 3 are met it will pass and then 5 will pass once, however, block 6 will not pass at all as there are no trades to close (block 1 has already established that)

      posted in Questions & Answers
      C
      CPBonzo
    • RE: Close all trades (profitable and losable ones) when reached a profit amount.

      @malospelos Without seeing how you have the blocks set up it is difficult to identify what the issue is. However, in the "Check profit" block make sure you have the filters set correctly. For example, if you want the EA to close trades opened manually and those opened by the ea make sure that is how the filter is set, or if it just manually opened trades set for those.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: Custom parameter to draw a line

      @trading-prana I can't say without seeing how you are creating your variables.

      posted in Questions & Answers
      C
      CPBonzo
    • 1
    • 2
    • 3
    • 4
    • 2 / 4