Creating a reference point at Trade open
-
Hi all
I am new at Fxdreema and would like to request some help please
I would like, at trade open, the EA to create the opening price as a reference point. Then when indicator crosses back over that opening price, to close the trade.
For example:
MA crosses Mid-Line Bollinger Band from below. Open BUY trade.
Take the opening price (say 1.300) as the reference point. Maybe create a line or somethingIf prices come back and MA crosses 1.300 from above, close the trade
Will really appreciate if someone could could help/advise on this?
Thanks so much
-
@zomba4rex Hi. your open position price is your point. then your position price back to open price your condition is true.
but I see a problem with this strategy. after open position your price going up and very fast back to your candle then your position close as a loser! -
This is one way to catch an open price into a variable. This is an example for buys only:

-
@xfire
Hi Xfire,Thanks for your help and advise..
Yes it will be a loss. But it will be a controlled loss, and that is what I am looking for
How then do i set the open price at TRADE OPEN as the reference point?
Because if I look at your example, wont the current open price be the one in consideration?
How to make the open price, at the cross where trade opened, as the reference point?
Been eating at me for days......
Thanks again
-
@l-andorrà said in Creating a reference point at Trade open:
catch an open price into a variable
Thanks a Andorra.
That is a bit complicated for me. How does one set open_price as a variable?
I tried to do what you said, but it didnt work -
https://fxdreema.com/shared/6n4ydNL3cWill appreciate if you can look at it?
Thanks
-
@zomba4rex my friend sent a good example for you. if you see in the top of the block have a variable for fill with the price.
you just create a variable and put there. and your variable is ready for use in other blocks -
@zomba4rex
i see you didn't follow my friend's sample. i fix this for you -
You will need to create constants and variables for sure if you want to create more EAs. I strongly recommend you to read this:
https://fxdreema.com/instructions/builder/constants-and-variables
-
@xfire
Hi xfire. I just wanted to thank you for your helpI had not seen your reply till today, and didnt know you took the effort and posted this
I didnt want you to think me ungrateful or anything, so - Thank you very much, highly appreciated (even though so late.......)
regards
Z4