Multi 10:4 Trader EA
-
theforexedge
- Trader
- Posts: 220
- Joined: Thu Apr 26, 2012 10:31 pm
- Location: Torquay
Re: Multi 10:4 Trader EA
Andy
I think last week was a double hit as the announcement by the Bank of Japan was major for the Yen, and then hit with the NFP hit on Friday.
You mentioned that the EA has broken even, so i think its not done too bad considering..
One idea based of FFCal that might be worth trying, is the strategy I follow when I'm trading in my Live account:
- My aim is to avoid Speaks - Bernanke, Central Banks etc. I will only enter Intraday trades 1-2 days before major 'Speaks' as these could involve interest rate changes, or massive QE / Stimulus - this is a fundamental of Bob's 10.4 (FFCal has this option)
- Prior to Speaks & High Impact News I close All Trades in Profit to lock in those pips, as I don't want to turn a profit into a loss
- Recently I've stopped trading at least a day prior to major speaks
- Currency Cross pairs that could be affected and that are near to Open Price i close, as too many times i've watched a 20 pip drawdown become 200pip drawdown.
- I usually wait 30 minutes after news before trading, as depending on the news (good / bad) you can get back in at better prices.
Of course none of this is new or revolutionary, but maybe we could add this option to the EA in the future and see how it fairs in forward testing..
I generally agree that most High Impact news is just noise and it's used to mark price up / down by the Institutional money to get better prices..of course opening a trade just before or during news should be avoided, but maybe having - do not trade NFP day as a first step?
Thanks anyway for coding a great EA..
Jason
I think last week was a double hit as the announcement by the Bank of Japan was major for the Yen, and then hit with the NFP hit on Friday.
You mentioned that the EA has broken even, so i think its not done too bad considering..
One idea based of FFCal that might be worth trying, is the strategy I follow when I'm trading in my Live account:
- My aim is to avoid Speaks - Bernanke, Central Banks etc. I will only enter Intraday trades 1-2 days before major 'Speaks' as these could involve interest rate changes, or massive QE / Stimulus - this is a fundamental of Bob's 10.4 (FFCal has this option)
- Prior to Speaks & High Impact News I close All Trades in Profit to lock in those pips, as I don't want to turn a profit into a loss
- Recently I've stopped trading at least a day prior to major speaks
- Currency Cross pairs that could be affected and that are near to Open Price i close, as too many times i've watched a 20 pip drawdown become 200pip drawdown.
- I usually wait 30 minutes after news before trading, as depending on the news (good / bad) you can get back in at better prices.
Of course none of this is new or revolutionary, but maybe we could add this option to the EA in the future and see how it fairs in forward testing..
I generally agree that most High Impact news is just noise and it's used to mark price up / down by the Institutional money to get better prices..of course opening a trade just before or during news should be avoided, but maybe having - do not trade NFP day as a first step?
Thanks anyway for coding a great EA..
Jason
- snailbeard
- Trader
- Posts: 615
- Joined: Mon Dec 24, 2012 10:54 am
- Location: Just above water somewhere between Oxford & Cambridge
Re: Multi 10:4 Trader EA
Perhaps instead of adding more and more controls to the current user interface, which is already quite busy, the additional reasons to enable/disable trading could be abstracted, so that users could pass parameters by either file or global variables.
e.g.
"AUDJPY[buy:off;sell:on;r:news]"
"AUDNZD[buy:off;sell:off;r:time]"
"GBPUSD[buy:off;sell:off;r:stophunt]"
"GBPJPY[buy:off;sell:off;r:holiday]"
"USDCHF[buy:off;sell:off;r:SR]"
The main EA could read these parameters
a) on start-up,
b) before submitting a pending order
c) and every minute if there are pending orders or open trades.
(change time frame to force an immediate check)
For example
user A wants disable sell but not buy on several pairs for reason 1
user B wants to disable sells and buys on a number of pairs for reason 2
does the EA need to know why the user wants to set these choices - not necessarily - only if the EA has to log why trading was disabled.
This would allow different users to experiment with different scripts, indicators or EAs for enabling and disabling trading.
Someone might have a script that disables all pairs on Mondays,
someone else might have a script which enables trading only between 5 and 6 am then 10 and 11 am etc
Someone might have a script/EA to enable Asian crosses in one time pair and Euro crosses in another time pair.
So all manner of controls can be met externally without adding more and more complexity to main EA.
This would allow the main EA to stabilise and focus on its core functionality.
Timelords, news trackers and fox hunters could experiment separately and independently without changes to the main EA.
The lessons of these separate controls could eventually be brought together into a sister EA which switches pair trading on and off in the main EA when conditions are not favourable for particular pairs.
e.g.
"AUDJPY[buy:off;sell:on;r:news]"
"AUDNZD[buy:off;sell:off;r:time]"
"GBPUSD[buy:off;sell:off;r:stophunt]"
"GBPJPY[buy:off;sell:off;r:holiday]"
"USDCHF[buy:off;sell:off;r:SR]"
The main EA could read these parameters
a) on start-up,
b) before submitting a pending order
c) and every minute if there are pending orders or open trades.
(change time frame to force an immediate check)
For example
user A wants disable sell but not buy on several pairs for reason 1
user B wants to disable sells and buys on a number of pairs for reason 2
does the EA need to know why the user wants to set these choices - not necessarily - only if the EA has to log why trading was disabled.
This would allow different users to experiment with different scripts, indicators or EAs for enabling and disabling trading.
Someone might have a script that disables all pairs on Mondays,
someone else might have a script which enables trading only between 5 and 6 am then 10 and 11 am etc
Someone might have a script/EA to enable Asian crosses in one time pair and Euro crosses in another time pair.
So all manner of controls can be met externally without adding more and more complexity to main EA.
This would allow the main EA to stabilise and focus on its core functionality.
Timelords, news trackers and fox hunters could experiment separately and independently without changes to the main EA.
The lessons of these separate controls could eventually be brought together into a sister EA which switches pair trading on and off in the main EA when conditions are not favourable for particular pairs.
-
fx800
- Trader
- Posts: 1334
- Joined: Sun Dec 04, 2011 4:11 am
Re: Multi 10:4 Trader EA
Hi MrLong.
I think someone has posted previously, it would be nice to have "PAIRS TO TRADE" rather "PAIRS TO IGNORE".
May be at the next update ?
Thanks in advance.
peter
I think someone has posted previously, it would be nice to have "PAIRS TO TRADE" rather "PAIRS TO IGNORE".
May be at the next update ?
Thanks in advance.
peter
-
MrLong
Re: Multi 10:4 Trader EA
Good Morning(GMT),snailbeard wrote:Perhaps instead of adding more and more controls to the current user interface, which is already quite busy, the additional reasons to enable/disable trading could be abstracted, so that users could pass parameters by either file or global variables.
e.g.
"AUDJPY[buy:off;sell:on;r:news]"
"AUDNZD[buy:off;sell:off;r:time]"
"GBPUSD[buy:off;sell:off;r:stophunt]"
"GBPJPY[buy:off;sell:off;r:holiday]"
"USDCHF[buy:off;sell:off;r:SR]"
The main EA could read these parameters
a) on start-up,
b) before submitting a pending order
c) and every minute if there are pending orders or open trades.
(change time frame to force an immediate check)
For example
user A wants disable sell but not buy on several pairs for reason 1
user B wants to disable sells and buys on a number of pairs for reason 2
does the EA need to know why the user wants to set these choices - not necessarily - only if the EA has to log why trading was disabled.
This would allow different users to experiment with different scripts, indicators or EAs for enabling and disabling trading.
Someone might have a script that disables all pairs on Mondays,
someone else might have a script which enables trading only between 5 and 6 am then 10 and 11 am etc
Someone might have a script/EA to enable Asian crosses in one time pair and Euro crosses in another time pair.
So all manner of controls can be met externally without adding more and more complexity to main EA.
This would allow the main EA to stabilise and focus on its core functionality.
Timelords, news trackers and fox hunters could experiment separately and independently without changes to the main EA.
The lessons of these separate controls could eventually be brought together into a sister EA which switches pair trading on and off in the main EA when conditions are not favourable for particular pairs.
Some good ideas there to look at.
Thanks
Brian
- simplex
- Trader
- Posts: 127
- Joined: Thu Feb 07, 2013 5:21 pm
- Location: An insignificant small town close to an insignificant former capital at the Rhine River.
Re: Multi 10:4 Trader EA
candletiger,candletiger wrote:Andy,veeyem wrote: 2013.04.04 10:09:51 Multi_10_4_EAv1.09 USDSGDm,H4: object name passed to ObjectSetText function cannot be an uninitialized or empty string
I think I spotted the problem:sObj is empty:Code: Select all
void UpdateGrid() { string sLine = "_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ "; // const on local scope string sSig = "signal"; // " string sObj = ""; string sTxt = ""; for (int y = 0; y < PairIndex + 1; y++) { if ( OrderSelect ( GetTicket( Pairs[y]), SELECT_BY_TICKET) == true ) sObj = "line" + 1 + y; double dMarketInfoBid = MarketInfo (Pairs[y], MODE_BID ); if ( OrderSymbol() == Pairs[y] && OrderType() == OP_BUYSTOP && dMarketInfoBid > OrderOpenPrice() - 10 / PFactor(Pairs[y]) && dMarketInfoBid < OrderOpenPrice() + 10 / PFactor(Pairs[y]) ) // select the master Trades ObjectSetText ( sObj, sLine, fontSize + 8, displayfont, BullishColor); else if ( OrderSymbol() == Pairs[y] && OrderType() == OP_SELLSTOP && dMarketInfoBid > OrderOpenPrice() - 10 / PFactor(Pairs[y]) && dMarketInfoBid < OrderOpenPrice() + 10 / PFactor(Pairs[y]) ) // select the master Trades ObjectSetText ( sObj, sLine, fontSize + 8, displayfont, BearishColor); else ObjectSetText ( sObj, "", fontSize + 8, displayfont, gridBackColor); // added to remove the line when conditions are not met.// added mr LongsObj only gets a value if trueCode: Select all
string sObj = "";If result is false, still ObjectSetText() is used.Code: Select all
if ( OrderSelect ( GetTicket( Pairs[y]), SELECT_BY_TICKET) == true ) sObj = "line" + 1 + y;
{}missing after first if()?
/ct
Great work! I think you are right. IMO brackets should be set like this:
Code: Select all
if ( OrderSelect ( GetTicket( Pairs[y]), SELECT_BY_TICKET) == true ) { // brackets!
sObj = "line" + 0 + y;
double dMarketInfoBid = MarketInfo (Pairs[y], MODE_BID );
if ( OrderSymbol() == Pairs[y]
&& OrderType() == OP_BUYSTOP
&& dMarketInfoBid > OrderOpenPrice() - 10 / PFactor(Pairs[y])
&& dMarketInfoBid < OrderOpenPrice() + 10 / PFactor(Pairs[y]) ) // select the master Trades
ObjectSetText ( sObj, sLine, fontSize + 8, displayfont, BullishColor);
else if ( OrderSymbol() == Pairs[y]
&& OrderType() == OP_SELLSTOP
&& dMarketInfoBid > OrderOpenPrice() - 10 / PFactor(Pairs[y])
&& dMarketInfoBid < OrderOpenPrice() + 10 / PFactor(Pairs[y]) ) // select the master Trades
ObjectSetText ( sObj, sLine, fontSize + 8, displayfont, BearishColor);
else
ObjectSetText ( sObj, "", fontSize + 8, displayfont, gridBackColor); // added to remove the line when conditions are not met.// added mr Long
}
- simplex
Last edited by simplex on Mon Apr 08, 2013 10:27 am, edited 1 time in total.
If you can't explain it simply, you don't understand it well enough. (Albert Einstein)
It appears that the Weighted Moving Average was invented by a trader who did not have a firm grasp of filter theory in hopes of reducing lag. (John F. Ehlers)
It appears that the Weighted Moving Average was invented by a trader who did not have a firm grasp of filter theory in hopes of reducing lag. (John F. Ehlers)
-
linuspoon
- Trader
- Posts: 23
- Joined: Fri Sep 14, 2012 5:52 am
Re: Multi 10:4 Trader EA
Hi simplex,simplex wrote:candletiger,
Great work! I think you are right. IMO brackets should be set like this:
Works fine for me.Code: Select all
if ( OrderSelect ( GetTicket( Pairs[y]), SELECT_BY_TICKET) == true ) { // brackets! //sObj = "line" + 0 + y; sObj = oName ( "line", 0, y ); double dMarketInfoBid = MarketInfo (Pairs[y], MODE_BID ); if ( OrderSymbol() == Pairs[y] && OrderType() == OP_BUYSTOP && dMarketInfoBid > OrderOpenPrice() - 10 / PFactor(Pairs[y]) && dMarketInfoBid < OrderOpenPrice() + 10 / PFactor(Pairs[y]) ) // select the master Trades ObjectSetText ( sObj, sLine, fontSize + 8, displayfont, BullishColor); else if ( OrderSymbol() == Pairs[y] && OrderType() == OP_SELLSTOP && dMarketInfoBid > OrderOpenPrice() - 10 / PFactor(Pairs[y]) && dMarketInfoBid < OrderOpenPrice() + 10 / PFactor(Pairs[y]) ) // select the master Trades ObjectSetText ( sObj, sLine, fontSize + 8, displayfont, BearishColor); else ObjectSetText ( sObj, "", fontSize + 8, displayfont, gridBackColor); // added to remove the line when conditions are not met.// added mr Long }
- simplex
Your code has a new function oName which is not defined in the EA. Can you also provide the code for this function? Thanks.
Linus
- simplex
- Trader
- Posts: 127
- Joined: Thu Feb 07, 2013 5:21 pm
- Location: An insignificant small town close to an insignificant former capital at the Rhine River.
Re: Multi 10:4 Trader EA
Hi Linus,linuspoon wrote:Hi simplex,simplex wrote:candletiger,
Great work! I think you are right. IMO brackets should be set like this:
Works fine for me.Code: Select all
if ( OrderSelect ( GetTicket( Pairs[y]), SELECT_BY_TICKET) == true ) { // brackets! //sObj = "line" + 0 + y; sObj = oName ( "line", 0, y ); double dMarketInfoBid = MarketInfo (Pairs[y], MODE_BID ); if ( OrderSymbol() == Pairs[y] && OrderType() == OP_BUYSTOP && dMarketInfoBid > OrderOpenPrice() - 10 / PFactor(Pairs[y]) && dMarketInfoBid < OrderOpenPrice() + 10 / PFactor(Pairs[y]) ) // select the master Trades ObjectSetText ( sObj, sLine, fontSize + 8, displayfont, BullishColor); else if ( OrderSymbol() == Pairs[y] && OrderType() == OP_SELLSTOP && dMarketInfoBid > OrderOpenPrice() - 10 / PFactor(Pairs[y]) && dMarketInfoBid < OrderOpenPrice() + 10 / PFactor(Pairs[y]) ) // select the master Trades ObjectSetText ( sObj, sLine, fontSize + 8, displayfont, BearishColor); else ObjectSetText ( sObj, "", fontSize + 8, displayfont, gridBackColor); // added to remove the line when conditions are not met.// added mr Long }
- simplex
Your code has a new function oName which is not defined in the EA. Can you also provide the code for this function? Thanks.
Linus
Sorry for that! Just forgot to delete this line. It is part of some modification I am still working on. At least for the moment please go back to MrLong's original code here:
Code: Select all
sObj = "line" + 0 + y;
- simplex
If you can't explain it simply, you don't understand it well enough. (Albert Einstein)
It appears that the Weighted Moving Average was invented by a trader who did not have a firm grasp of filter theory in hopes of reducing lag. (John F. Ehlers)
It appears that the Weighted Moving Average was invented by a trader who did not have a firm grasp of filter theory in hopes of reducing lag. (John F. Ehlers)
- simplex
- Trader
- Posts: 127
- Joined: Thu Feb 07, 2013 5:21 pm
- Location: An insignificant small town close to an insignificant former capital at the Rhine River.
Re: Multi 10:4 Trader EA
Hi Andy,
I have some trouble understanding the following code (line 2863 ff in v2.00):
I have some trouble understanding the following code (line 2863 ff in v2.00):
Code: Select all
if( RunningTrades(Pairs[y]) > 1 && !useAverageBE )
ObjectSetText("be" + y,"("+FormatPrice(Pairs[y], calculateBE(Pairs[y]), 2)+")", fontSize, displayfont, Gold);
else if( RunningTrades(Pairs[y]) > 1 && useAverageBE )
ObjectSetText("be" + y,"("+FormatPrice(Pairs[y], calculateBE(Pairs[y]), 2)+")", fontSize, displayfont, BearishColor);
else
ObjectSetText("be" + y, "", fontSize + 2, "Wingdings", Black);
- What is the logic behind the colours? No BullishColor used?
Under which condition should BE be displayed? I never noticed this column in forward test.
If you can't explain it simply, you don't understand it well enough. (Albert Einstein)
It appears that the Weighted Moving Average was invented by a trader who did not have a firm grasp of filter theory in hopes of reducing lag. (John F. Ehlers)
It appears that the Weighted Moving Average was invented by a trader who did not have a firm grasp of filter theory in hopes of reducing lag. (John F. Ehlers)
-
MrLong
Re: Multi 10:4 Trader EA
simplex wrote:Hi Andy,
I have some trouble understanding the following code (line 2863 ff in v2.00):
Code: Select all
if( RunningTrades(Pairs[y]) > 1 && !useAverageBE ) ObjectSetText("be" + y,"("+FormatPrice(Pairs[y], calculateBE(Pairs[y]), 2)+")", fontSize, displayfont, Gold); else if( RunningTrades(Pairs[y]) > 1 && useAverageBE ) ObjectSetText("be" + y,"("+FormatPrice(Pairs[y], calculateBE(Pairs[y]), 2)+")", fontSize, displayfont, BearishColor); else ObjectSetText("be" + y, "", fontSize + 2, "Wingdings", Black);
- What is the logic behind the colours? No BullishColor used?
Under which condition should BE be displayed? I never noticed this column in forward test.
simplex
haha, sorry that was just to confirm that the break even function was active, gold, not active red is active, but forget that function because I coded that when I was usining fixed lots, I have to re-code when I arrive home.
- simplex
- Trader
- Posts: 127
- Joined: Thu Feb 07, 2013 5:21 pm
- Location: An insignificant small town close to an insignificant former capital at the Rhine River.
Re: Multi 10:4 Trader EA
Great - I'll relax!MrLong wrote:simplex wrote:Hi Andy,
I have some trouble understanding the following code (line 2863 ff in v2.00):
...simplex
- What is the logic behind the colours? No BullishColor used?
Under which condition should BE be displayed? I never noticed this column in forward test.
haha, sorry that was just to confirm that the break even function was active, gold, not active red is active, but forget that function because I coded that when I was usining fixed lots, I have to re-code when I arrive home.
simplex
If you can't explain it simply, you don't understand it well enough. (Albert Einstein)
It appears that the Weighted Moving Average was invented by a trader who did not have a firm grasp of filter theory in hopes of reducing lag. (John F. Ehlers)
It appears that the Weighted Moving Average was invented by a trader who did not have a firm grasp of filter theory in hopes of reducing lag. (John F. Ehlers)