Trade based on the current price compared to the last entry price?
-
Hello forum,
What is the block that opens subsequent trades (up to a max number) in the same direction of the first trade, based on the current price compared to the last entry price? -
The max number is controlled by... let's say "Check trades count".
I don't know if this is even close to what you are asking for, but here it is - https://fxdreema.com/shared/ZDjQr6Tre
New trade is created once a day - at 0:00. If there is no trade - a new Buy is created. If there is at least one trade and the current price is > from the open price of the newest trade - Buy is created. If the price is <, then Sell is created. -
__The max number is controlled by... let's say "Check trades count".
I don't know if this is even close to what you are asking for, but here it is - https://fxdreema.com/shared/ZDjQr6Tre
New trade is created once a day - at 0:00. If there is no trade - a new Buy is created. If there is at least one trade and the current price is > from the open price of the newest trade - Buy is created. If the price is <, then Sell is created.[/quote:vltt50md]Thank you fxdreema, I have added the condition "if trade"
Here is for your information: https://fxdreema.com/shared/hAdOQnJJbDo you think the Action 2 does what says in the description?
-
Look at my example again, block 11. You tend to prefer "If trade" blocks, but I used "No trade"
If you ask me such queston, it means that you don't understand something. I don't want people to copy stuff from here and there thinking that it might work as they expect. I prefer you to understand what is going on, so better ask me if you don't understand something.
"For each Trade" with value 1 set to "Not more than..." only loads the latest running trade, if such exists. Then in the next block I'm checking if the current price (Ask for Buys and Bid for Sells) is above or below the Open Price of that trade. Or I believe that it works that way :))
I used "Chart model", which means that the block will pass if the current price (Ask for Buys or Bid for Sells) is above the open-price (+ Pips away, which is 0 in this case) of the trade, no matter if the trade is Buy or Sell. In the default "Trading model" calculations are mirrored for Sells. -
__Look at my example again, block 11. You tend to prefer "If trade" blocks, but I used "No trade"
If you ask me such queston, it means that you don't understand something. I don't want people to copy stuff from here and there thinking that it might work as they expect. I prefer you to understand what is going on, so better ask me if you don't understand something.
"For each Trade" with value 1 set to "Not more than..." only loads the latest running trade, if such exists. Then in the next block I'm checking if the current price (Ask for Buys and Bid for Sells) is above or below the Open Price of that trade. Or I believe that it works that way :))
I used "Chart model", which means that the block will pass if the current price (Ask for Buys or Bid for Sells) is above the open-price (+ Pips away, which is 0 in this case) of the trade, no matter if the trade is Buy or Sell. In the default "Trading model" calculations are mirrored for Sells.[/quote:26e6isdb]Okay, I am starting to understand the logic behind it. Thank you for the additional explanation. I am going to elaborate my strategy in depth now.
I wonder why when I go to convert the EA into calgo robot with http://2calgo.com/Home/Index#converted_indicator (for optimization porpoise)it says
"It is MQ5 code.
MQ5 code cannot be converted.
Convert MQ4 code."When the EA is in MQ4 from fxdreema
-
Maybe this converter is old. In the past MQL4 was very different than MQL5, but now many things are the same. I often update the code of the blocks and I always try to keep it as same as possible in both, MQL4 and MQL5 versions