fxDreema

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

    CPBonzo

    @CPBonzo

    11
    Reputation
    1417
    Profile views
    77
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    CPBonzo Unfollow Follow

    Best posts made by CPBonzo

    • RE: NO TRADE

      The first thing I notice is that in the condition block the left operand is the bid price, which seems ok, but the right operand is the name of the object. The bid value is always going to be a price and therefore will not cross a text attribute. I would start by changing the Attribute of the object to set 1 (numeric) and the Property to price level 1, which is the price at which the line is placed on the chart.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: how to work with the buttons

      When you create the button ensure that under the "adjust" settings the it is set to not pressed. Then under "on tick" or "on chart" depending on the function you want to control, put the select button and check button state blocks. From the orange connector run whatever function you want to happen when the button is pushed. This will continue to run as the button remains pressed - unless - after the functions you add a "Custom MQL4 code" and insert the following:

      ObjectSet(LoadedObjectName(),OBJPROP_STATE,0);

      This will reset the button to off (i.e. 0, when on is 1). You could also use the block to change the button colour when pressed by changing the properties etc.

      I hope that helps.

      Regards

      Colin

      posted in Questions & Answers
      C
      CPBonzo
    • RE: How to Make EA trade Engulfing candle

      @surachefx is correct, you need to specify more of the parameters of the engulfing pattern. In your post the conditions will pass if the body of candle 1 is greater in size than the body of candle 2, but this is only one of the characteristics of an engulfing pattern for Bearish Engulfing and there could be circumstances where these conditions are true but there is no engulfing pattern.
      When creating an EA that trades candle patterns (or any EA for that matter) I find it useful to write down all of the characteristics of the pattern, in a similar way as @surachefx has done above and then identify how fxDreena logic can be used to describe these characteristics. This software is powerful and extensive so there will almost always be more than one way to write an EA to perform a particular task. Running the EA in strategy tester or a demo account and watching it will almost certainly reveal things missed e.g. it picks up too many signals because we haven't specified the minimum size of the candles for the engulfing pattern to be valid.
      There is a lot of infomation on this Forum and a quick search on candle patterns will reveal a wealth of information others have already shared.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: How to Make EA trade Engulfing candle

      The Pass block does nothing except trigger the next block to execute and if you connected the chain of blocks to the No Trade block, for example, you would not need the Pass block at all.
      To answer your question, you would need to place any additional condition block after the Pass block. As to where, it depends in what order you need things to happen and how often conditions should be checked or action taken. As I suggested, it is good idea to write on a piece of paper the logic of the EA you are designing so you can see the order and then structure the fxDreema blocks to do this. If, for example, you want the conditon in your block 2 to occur before an engulfing bar then place it before the other conditions. Where you place it in relation to the Once Per Bar block depends on how you want the EA to function. Without that block the condition will be checked every tick and passed once the conditions are met therefore activating the next block. The Once Per Bar block in this set up means that the following conditions will only be checked once per bar (as it says) and this is usually at the start of the bar regardless of how many ticks there are. If the conditions are met later in the bar the conditions will not pass until the next bar, assuming the conditions remain the same.
      If you remove the once per bar block and, for example, connect your block 2 above the condition blocks 5 and 6 the EA will check for your condition every tick and once passed will check for an engulfing candle as long as your condition is met and every tick all the conditions ar emet it will send an alert and draw an arrow. If you place the Once per bar block betwen the last condition and the alert and arrow blocks these events will only occur once per bar however many times the conditions pass per bar.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: NO TRADE

      @josh01 You will have your reason for wanting to use the Bid value on the left, but I use Candle such that the condition passes when the candle crosses a line. This example from a current project:

      0_1559770526991_16d1b31e-8700-4447-bf8f-5a7833a3f0f8-image.png

      posted in Questions & Answers
      C
      CPBonzo
    • RE: NO TRADE

      @josh01 There are a couple of things that occur to me. Firstly, in the example you shared the drawn lines have no name, so theconditions, which related to named lines don't relate to the lines drawn. Secondly, you have the condition placed after once per bar, which means the condition will only be checked at the beginning of the bar (usually) if the candle doesn't cross at that moment then the condition isn't met.
      I would suggest trying with the conditions conected after a "No Trade" block, that time the conditions block is running all the time there is no trade, or use the "Pass" block if you want it to run even if there are live trades. Then place the "Once per Bar" block between the condition and the Buy and Sell blocks, this will ensure than when the condition is met a trade is only plced once in that bar even if the candle crosses the line more than once in this time.

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

      @trading-prana Why not create a variable with the value of (high+low)/3 and then use that variable as the value for the line?

      posted in Questions & Answers
      C
      CPBonzo
    • RE: keeping indicators inside the EA

      @josh01 No it isn't. Any indicators used by the EA need to be on theMT4 or MT5 platform.

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

      @trading-prana Once you have the variable created, it needs to be placed as a value in the Draw Line block. In this instance, you will need to set the block to draw a horizontal line and then the value below that relates to the price i.e. the height on the chart at which you want the line to be drawn. Change the setting in the first of the pull-down menus to "Value", the second to "Numeric" (it should default to that) and then where you see a current value of "1" right-click that box and a list of your constants and variables will be displayed. Pick the variable created to give (high+low)/3 and the line will be drawn at that level on the chart.

      Of course, the value (high+low)/3 is in most occasions going to be significantly below the current price so you may need to zoom way out on the chart to see it.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: close a certain trade when its Profit reaches same number of pips as its Stoploss?

      I think you need to use the Close Trade block from the purple Loop for Trades and Orders menu and not the blue one from the Trading Actions. The purple Close Trade block closes only the trade in the current loop. I haven't checked this, but it is certainly worth a try.

      posted in Questions & Answers
      C
      CPBonzo

    Latest posts made by CPBonzo

    • RE: close a certain trade when its Profit reaches same number of pips as its Stoploss?

      I think you need to use the Close Trade block from the purple Loop for Trades and Orders menu and not the blue one from the Trading Actions. The purple Close Trade block closes only the trade in the current loop. I haven't checked this, but it is certainly worth a try.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: Need help with stoploss

      In the adjust box for the stop loss you -1 Depending on what you are trading, that could be a very long way from the open. If you want to adjust by pips you need to put +1 pips or -1 pips. If you click the ? to the left of the adjust box it gives some useful examples.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: Constant unexisting in blocks

      Is it possible you did use the constant in the block and then changed the operand on one side without resetting the relevant parameter to the original value, or zero?

      For example, if you had originally set the left operand to something other than Candle and used the "id" constant and then changed the operand to candle without resetting the constant fxDreema will still see the constant in the block despite it not being used. You will see this if you set the operand back to whatever it was before.

      The quickest solution is probably to delete the block and create a new one in its place.

      posted in Bug Reports
      C
      CPBonzo
    • RE: Take Profit Trail

      Trailing stops operate in such a way that they move when the price is moving away from them. Most commonly people trail the stop-loss, which means as the price moves away from the open and towards the take profit the stop-loss follows, or trails, it.

      Similarly, a trailing take-profit only moves when the price is moving away from it. For example, when the price moves against you (the wrong way from the open) a trailing take-profit will follow it (it trails the price) this reduces the take profit level such that if the price reverses and moves back in the planned direction the take-profit is closer to the open than it was and if reached the profit taken is lower than it would have been when the trade was originally set up.

      To summarise, a trailing stop-loss moves when the trade moves in your favour and profit is increasing, a trailing take-profit moves when the trade goes against you and profit is reducing/loss increasing.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: Draw Horizontal Line of value variable

      @zedeai2 You could use the Draw Text box. This allows you to place the text, or number, anywhere on the chart using price and time. In the Time(1) section you could place the text at candle 1(or any other) and then locate it at the same height (price value) as the line by setting the Price (1) section as you did for the line and use the variable in the value box. Then use the variable again to replace the "sample text " in the text box and that should then show the value of the line i.e. the variable, at the location of the line.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: Draw Horizontal Line of value variable

      @zedeai2 In the Draw Line block, under Price(1) change the first pull down to value and the second to numeric then put your variable in the box for the value. This will draw a line at the value set by your variable. Note. your other settings will mean this line is redrawn every bar.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: Donchian Channels

      The nature of the standard Donchian Channel is such that candle 1 will not close above or below the channel as set by candle 1 because the channel lines are the highest and lowest point of the last 20 (in your case) candles. Therefore the candle cannot close above the high of a range of which it is part. If you change the candle id in the right-hand side of the condition blocks to 2 you should find the EA makes trades.

      posted in General Discussions
      C
      CPBonzo
    • RE: Losing my mind trying to get trailing stop to work! :)

      I don't know what more I can say. You have the level of the trailing stop set to be the highest value of the previous 144 candles. If that value is less than the current stop loss then, yes, the stop will trail in 5 pip steps once the price has moved 5 pips from the open price. But, if the highest value of the past 144 candles is never lower than where the stop loss is now it will not move.
      In your example the first trade has, by a rough count, set the SL to the high of candle 52, which one assumes was the highest candle for the past 144. Once the price moves 5 pips from the open price the ea will calculate 144 candles back from the current candle and move the stop loss to the highest value if this is different from the current SL, but in this example it isn't because the same candle is still the highest of the previous 144 and so there is no change.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: Check max profit and max loss during a trade

      If in the Adjust Variable block you have you put the variable "counter" in the box where you currently have the 0 and under adjust you +1 then the first chain of blocks you have on the left will, on each bar add one to the variable for each trade you have open.
      You will then need to produce something to reset the counter to zero when there are no trades.

      posted in Questions & Answers
      C
      CPBonzo
    • RE: Auto Lot Size

      @ava What exactly do you mean by Auto Lot according to new balance?

      posted in Questions & Answers
      C
      CPBonzo