- #3,031
- Jan 25, 2009 4:39pm Jan 25, 2009 4:39pm
- | Joined Nov 2006 | Status: Trader | 1,143 Posts
24 hours in a day – 24 bottles of beer in a case – Coincidence? I think not
Trading system using relative strength 2,816 replies
BASKET TRADE Management: Using multiple trade management EA's on basket trades 11 replies
Basket Knights - A Basket Trading Round Table 1,313 replies
Trading System Using Relative Strength-Part 2 1,499 replies
My version of a relative strength basket 2 replies
Original method basket trading:
Removed the bug that made the EA display an incorrect boundary setting. This was merely a forgotten change in a copy/paste.
DC trading:
![]()
bool HaveBarsPassed(string symbol)
{
// Called from the CompareTriggerStrengths function.
// Cycles through the history to see how long ago each relevant trad closed.
// Returns true if enough time has passed, else false
int histotal = OrdersHistoryTotal();
if (histotal > 0)
{
for(int cnt=0;cnt<histotal;cnt++)
{
if(OrderSelect(cnt,SELECT_BY_POS,MODE_HISTORY))
{
if(OrderMagicNumber() == DcMagicNumber && OrderSymbol() == symbol)
{
for (int b=0;b < No_Trade_For_X_Bars;b++)
if (Time[b] <= OrderCloseTime()) return(false);// if b=0, don't open a new position if we're still on the same candle
}//if(OrderMagicNumber() == DcMagicNumber && OrderSymbol() == symbol)
}//if(OrderSelect(cnt,SELECT_BY_POS,MODE_HISTORY))
}//for(int cnt=0;cnt<histotal;cnt++)
return(true);// Got this far, so the condition is ok
}//if (histotal > 0)
}// End bool HaveBarsPassed(string symbol) DislikedHi all,
Have you already came with any exact entry/exit rules for this strategy. If so would you explain or give me post links. And does anyone trade this live? Whats ur impressions if so? Thanks!Ignored
Disliked
for (int b=0;b < No_Trade_For_X_Bars;b++)
if (Time[b] <= OrderCloseTime()) return(false);// if b=0, don't open a new position if we're still on the same candle
}//if(OrderMagicNumber() == DcMagicNumber && OrderSymbol() == symbol)
}//if(OrderSelect(cnt,SELECT_BY_POS,MODE_HISTORY))
}//for(int cnt=0;cnt<histotal;cnt++)
return(true);// Got this far, so the condition is ok
}//if (histotal > 0)
}// End bool HaveBarsPassed(string symbol)
[/code]Ignored
DislikedSteve I placed the new version up and will let you know how it goes. I did notice it seems to be staying asleep. Not sure if this is because the market isn't open yet here or if there is a problem with that bit.Ignored
DislikedWithout a pair of braces following
for (int b=0;b < No_Trade_For_X_Bars;b++)
I'm not sure what the compiler will make of it.
But if it works for Matrixebiz, it must be ok.
JunjaIgnored
DislikedSteve I placed the new version up and will let you know how it goes. I did notice it seems to be staying asleep. Not sure if this is because the market isn't open yet here or if there is a problem with that bit.Ignored
DislikedNope, 'tis because the markets are still effectively closed. The EA will wake up as soon as the chart on which it is installed gets its first tick.
I do not know what effect running the EA will have before the markets open. It will do its 2 mins sleeping, then wake up about the time the indi is refreshing all its readings. This might cause it to misbehave - I don't know. I never run it until after my platform can be guaranteed its first ticks.
Ignored
DislikedBrilliant, Junja. Thanks. You have saved me a lot work. Those blasted curly braces are indeed missing and I hate to imagine what effect their absence might have, or how long it would have taken me to find the error.
So, sorry everyone. If you downloaded the previous V4a then you need to re-download.
Ignored
DislikedWoops, sorry, about thatI quickly added that code in and didn't check it.Ignored
DislikedSteve just so you know it is still opening trades after I close them out. it happened on the eur/chf It was up a bit so I closed it and it immediately reopened the position even though the 2 bar rule is enabled.
Is this rule being applied on each method? I am doing the dc method atm.Ignored
DislikedSteve just so you know it is still opening trades after I close them out. it happened on the eur/chf It was up a bit so I closed it and it immediately reopened the position even though the 2 bar rule is enabled.
Is this rule being applied on each method? I am doing the dc method atm.Ignored
I think I have found the prob. More about this tomorrow. For now, everyone, just accept that trades you close manually might immediately reappear.
hic
up
Disliked
I am not going to try to solve this right now because:
- it is 12.53 at night, UK time
- the port that preceeded the red wine was very nice
- the red wind that preceeded the whisky was very nice
hic
up
Ignored