New User help Please
-
I have looked at the example for "Buy-Sell-Buy-Sell on opposite conditions" and understand it, however I would like to do something similar but with the option to Close a trade on other conditions prior to the reversal/new trade.
So I would need to check for any trade that's running.
This is my first attempt but it does not work properly.
https://fxdreema.com/shared/JXEqfIrXc
Can you help me to understand?
Many Thanks
Alan
-
In block 26 it's checked for Buys and Sells. In block 27 you have SL and TP. The sell side does not match the buy side

-
Thanks fxD,
I had corrected that but since have learned a little more and got it working by keeping Buy Sell sides different under their own 'Once Per Bar'.
I am still a little confused over the Events. The onTick event I am using has the 'Once Per Bar' blocks in them. When does that Block action? On the Close of Bar or Open of next. In other words if I want to use the (most recent) Closed Bar for a Condition will that always be Candle 1 ?
I'm sure it wont be long before I upgrade.
Many Thanks
Alan
-
on Tick = blocks run on every tick.
Once per bar under on Tick = passes once when a new bar is created, on the first tick of the new bar. I tried to explain the problems with the "On Close of Bar" problems here - https://fxdreema.com/help/-/working%20w ... e%20closes
At any time, you can get the value of any candle - open, high, low or close... or even highest and lowest values within some period
-
Thanks again, I am learning a lot just trying things and testing them.
You mention I can get candle values at any time. How do I do this? Do I have to count back the candles to the one I want or can I just save a price to a variable?
Cheers
Alan
-
Yes. There is this setting called Candle ID. 0 is the current candle, 1 is the previous and so on. Also, candles can be selected by time. You can see that property "Find Candle by". But when possible, find candles by ID.
-
Thanks, sometimes it would be easier just to save a price, say CLOSE, I assume I can save that to a variable?
Thanks again
Alan
-
You can save everything in variable, but candles data is available immetiately after the EA is loaded, it's just there and there, it's like fruits in a tree
