Open trade on new candle
27 replies
slowbutsure
12 years ago #112139
HI
I just want a rule that says as soon as a new candle opens, then enter a trade. Can anyone tell me how?\
Thanks
0
Mark Fric
12 years ago #124454
simple condition:
IF IsBarOpen is true
THEN…
Mark
StrategyQuant architect
0
slowbutsure
12 years ago #124460
Great thanks.
0
slowbutsure
12 years ago #124461
Does Open P/L in pips give a whole number e.g 15 or 0.0015?
Thanks
0
slowbutsure
12 years ago #124462
Also, I made an EA that will open on two different pairs, but it only opens on the pair the chart is on.
Rules are
1. If bar is open
2. then open a long on EURUSD & on USDCHF
Am I doing something wrong?
0
Mark Fric
12 years ago #124464
Open P/L in pips returns whole number, for example 15
– problem with opening two trades – it i shard to tell you what is wrong. It should work this way. Do you use different magic number for each order?
Mark
StrategyQuant architect
0
slowbutsure
12 years ago #124472
Yes I’m using different magic numbers.
0
slowbutsure
12 years ago #124477
Mark, here is the strategy file. Could you take a look?
Thanks
0
Mark Fric
12 years ago #124521
I found one issue that made problem when opening order on another symbol, we’ll release autoupdate later today that will fix it.
Mark
StrategyQuant architect
0
slowbutsure
12 years ago #124523
Great thanks.
0
slowbutsure
12 years ago #124544
Any update on the fix?
0
Mark Fric
12 years ago #124593
I’m sorry, it takes longer than expected, we’ll release update tomorrow (7 May)
Mark
StrategyQuant architect
0
slowbutsure
12 years ago #124640
Thanks for the fix Mark, much appreciated.
0
slowbutsure
12 years ago #124642
Mark,
My broker symbols are suffixed with SB. So USDCHF is USDHFSB. How can I change the symbol in EA Wizard so that it will have SB on the end. At the moment my broker rejects usdchf from ea wizard.
Also, I thought the function “Is bar open” would only open a trade when a new bar opens? I put it on the daily chart and it immediately opened a trade instead of waiting for a new bar.
Thanks.
0
Mark Fric
12 years ago #124656
Hello,
there are no fixed symbols in EA Wizard, you can rewrite them and write any text.
Also, I thought the function “Is bar open” would only open a trade when a new bar opens? I put it on the daily chart and it immediately opened a trade instead of waiting for a new bar.
yes, it should work like this. As I checked there was an error introduced with support for Range/Renko charts update – now it opens the trade also when the EA starts.
I’ll release an autoupdate today that fixes this problem.
Mark
StrategyQuant architect
0
slowbutsure
12 years ago #124662
Thanks. One other thing. I want to create this ea to open a trade on two different currencies and then close both trades together when the net profit of both trades = 5 pips.
How can I do that? I thought it was P/L in pips but it only deals with one of the trades not the net of both of them.
0