Crossover EA with Stat Arb
-
I have built a crossover which trades correctly 90% of the time. Still working on why erroneous trades are thrown when no rules would suggest they be fired off. Lots of Bugs in this platform!
But ... How after a TP is hit, do I stop another trade from opening immediately. Seems to be a common problem in FXDreema. I want to collect a profit based upon statistically reliable deviation, then wait for the opposite to trigger a new trade - in opposite direction.
How can this be done?
-
@pan4pips If you are trading a crossover, make sure to use Candle ID 1 in the settings. The crossover can happen while the candle is still moving, and its not always visible in the final candle (this is the "bug").
-
@roar candle ID where? Seems it could be in multiple places

The circled trades are where it should properly reverse... There are zero rules, no take profit settings or otherwise on the multiple buy/exit/ buyexit trades.. it should be opening a long and closing on opposite.... unless I have identified an exit prior..
What I'm trying to do is if there's an exit before the cross over signal.. wait for the cross over signal.
-
@pan4pips This is the setting I mean. Put 1 there, its 0 by default.

-
@roar Ahh Thank you! I'm not sure if those are visible for me as I have to loop through chart objects to get the triggers. I'll put some focus to that though! Thank you!
-
Found your other question!
It looks like Lion has answered the first part of your question. The second part, regarding once per direction (buy/sell) needs answering.
Your rule though "wait for opposite to trigger a new trade" is vague. Unless your strategy is close to perfect, it could be that once you exit with profit on a buy, you won't get a trigger for a sell until hours later, effectively missing out on a buy opportunity.
Imagine your rule says BUY. Then it buys, later, you close the trade. Then your rule says BUY again. If you wish to implement that ONLY a sell is valid, you will miss this BUY.
If this is what you want, then simply use "On" and "Off" blocks.
Pretend your "Buy Now" is block #10. You connect the off block to this and put "10" in the settings. After this one, you put ON and lets say your "Sell Now" block is #20..so you will turn on block 20. You do the same for the "Sell Now" but its flipped. Off is block 20 and on is block 10.
This will compliment your Buy/Sell criteria.
-
I'm really good with Chart Objects. You will be using CTR+B a lot. This is where your Objects are. It tells you the Name, and other information.
-
@TitanGeorge I'm becoming more efficient with the objects but your first answer I think worked well! Thank you!!!!
-
I'm glad pan. If you need help with objects, let me know. They're usually straight forward but sometimes manually created objects can cause trouble.
Another idea, if you want to MANUALLY control your Buys/Sells. Objects can help with that. For example, if you write "Buys On" Then buys will work and vice versa. Only if you have access to the computer at all times or have remote control access.
-
@titangeorge said in Crossover EA with Stat Arb:
I'm glad pan. If you need help with objects, let me know. They're usually straight forward but sometimes manually created objects can cause trouble.
Another idea, if you want to MANUALLY control your Buys/Sells. Objects can help with that. For example, if you write "Buys On" Then buys will work and vice versa. Only if you have access to the computer at all times or have remote control access.
I've used a one click interface for years. My next attempt is to duplicate it.

-
I'm not as familiar with once click interfaces, fxDreema offers the same functionality but the approach would be different:
Close when TOTAL specified profit is achieved and Close all Trades and Terminate the EA.
Close when specified profit/pips is achieved on the pair and terminate or turn off the trading.
-
@titangeorge said in Crossover EA with Stat Arb:
I'm not as familiar with once click interfaces, fxDreema offers the same functionality but the approach would be different:
Close when TOTAL specified profit is achieved and Close all Trades and Terminate the EA.
Close when specified profit/pips is achieved on the pair and terminate or turn off the trading.
Yeah, that's not an effective approach to trading. I'm by far a programmer.. in fact I have cringed for 20 years thinking about it. lol This makes it a good bit easier in some instances.. but from a code students approach it still leaves out the flow of things that no programming book says. I think I've tried to read them all with the same success rate as migraines lol.
Now to the number side of things, no problem!