Helping to code this strategy
-
Dear Sir,
Can you help me giving some instructions of how to build this strategy into EA. The strategy isIf there is no trade open, EA must wait for gold to move up or down within 1500pips (this pips can be adjustable) before opening Trade 1.
Ex:If gold moves up from 2500 to 2515, EA must open Trade 1 (SELL)
but if gold moves down from 2500 to 2485, EA must open Trade 1 (BUY)
If Trade 1 is closed with profit, EA must wait for gold to move up or down within 1500pips from the closing price before openning new Trade 1 (If up, SELL, If down BUY)
Note: 1500pips waiting must be adjustable because sometimes i need EA to wait till 2000pips before opening Trade 1 or sometimes 1000pips before opening Trade 1 depending on actual market fluctuation.
Thanks in advance for your assistance. -
I have some initial questions:
- Is the first distance (considered from current price at the moment or based on other criteria?
- Are 2500, 2515 and 2485 values price levels or pips distances?
-
just draw a line from each closing candle of shift 1, a line above and below
-
@Khun-Som-Ath
Dear Sir,
First, the starting point of new loading EA is from Asian market open, then
second starting point is from trade 1 hitting TP.Well, 2500 - 2515 is the pip distance and 2500 - 2485 is also the pip distance as an example.
Thanks
-
@Duelistking
Dear sir,Honestly, i am very young of Fxdreema so i have no idea of what you are telling to do. Please detail about it
Thanks in advance for your help.
-
@Duelistking Do you really need those lines? The bot can work perfectly fine with variables storing that information and the coding will be FAR less complicated.
-
@l-andorrà
Dear Sir,
Well, if those lines are not needed, please tell me how to do it with your method. I will be thankful to you.Best regards,
-
ok i will made
-
@Khun-Som-Ath Definitely they are not needed if the bot is supposed to be 100% automatic (is no human intervention at all). So let's begin with those initial distance calculations. Here you have a first structure:
https://fxdreema.com/shared/KJ2qALMbb
I created a Constant that is supposed to select the distance in pips for both trades to be activated. Then on the chart you will see both price levels. If this is what you want, we can move on from there.