Hi,
i modified the balance function for myself to get only one currency in one direction
like eurusd long and usdchf long is allowed
The original code doesnt work properly
Best Regards
Dennis
>>>>>>>>>>>>>>>>>>>>>
bool BalancedPair(int type)
{
if (IsTesting()) return (true);
string BuyCcy1, SellCcy1, BuyCcy2, SellCcy2, sType1, sType2;
if (type == OP_BUY || type == OP_BUYSTOP)
{
sType1 = "Buy";
BuyCcy1 = first.currency;
SellCcy1 = second.currency;
}//if (type == OP_BUY || type == OP_BUYSTOP)
else
{
sType1 = "Sell";
BuyCcy1 = second.currency;
SellCcy1 = first.currency;
}//else
for (int cc = OrdersTotal() - 1; cc >= 0; cc--)
{
if (!OrderSelect(cc, SELECT_BY_POS)) continue;
if (OrderSymbol() == symbol) continue;
if (OrderType() == OP_BUY || OrderType() == OP_BUYSTOP)
{
sType2 = "Buy";
BuyCcy2 = StringSubstr(OrderSymbol(), 0, 3);
SellCcy2 = StringSubstr(OrderSymbol(), 3, 3);
}//if (OrderType() == OP_BUY || OrderType() == OP_BUYSTOP)
else
{
sType2 = "Sell";
BuyCcy2 = StringSubstr(OrderSymbol(), 3, 3);
SellCcy2 = StringSubstr(OrderSymbol(), 0, 3);
}//else
if ( (BuyCcy1 == BuyCcy2) || (SellCcy1 == SellCcy2) )
{
//Print("BalancedPair checks ", symbol, "(", sType1, ") -> blocked by ", OrderSymbol(), "(", sType2, ")");
//last.balance.block.time = TimeCurrent();
//last.balance.block.curr = OrderSymbol()+"-"+sType2;
//last.balance.block.type = sType1;
return(false);
}
}//for (int cc = OrdersTotal() - 1; cc >= 0; cc--)
//Got this far, so it is ok to send the trade
return(true);
}//End bool BalancedPair(int type)
>>>>>>>>>>>>>>>>>>>>>
The New Beast!
- Pippopotamus
- Trader
- Posts: 70
- Joined: Wed Nov 16, 2011 2:32 pm
- Location: NY/NJ Metro Area
Re: The New Beast!
Many, many thanks Dennis. Will test. FWIW, my set file, and pair selections on request...Pipposnoopier wrote:Hi,
i modified the balance function for myself to get only one currency in one direction
like eurusd long and usdchf long is allowed
The original code doesnt work properly
Best Regards
Dennis
>>>>>>>>>>>>>>>>>>>>>
bool BalancedPair(int type)
{
if (IsTesting()) return (true);
string BuyCcy1, SellCcy1, BuyCcy2, SellCcy2, sType1, sType2;
if (type == OP_BUY || type == OP_BUYSTOP)
{
sType1 = "Buy";
BuyCcy1 = first.currency;
SellCcy1 = second.currency;
}//if (type == OP_BUY || type == OP_BUYSTOP)
else
{
sType1 = "Sell";
BuyCcy1 = second.currency;
SellCcy1 = first.currency;
}//else
for (int cc = OrdersTotal() - 1; cc >= 0; cc--)
{
if (!OrderSelect(cc, SELECT_BY_POS)) continue;
if (OrderSymbol() == symbol) continue;
if (OrderType() == OP_BUY || OrderType() == OP_BUYSTOP)
{
sType2 = "Buy";
BuyCcy2 = StringSubstr(OrderSymbol(), 0, 3);
SellCcy2 = StringSubstr(OrderSymbol(), 3, 3);
}//if (OrderType() == OP_BUY || OrderType() == OP_BUYSTOP)
else
{
sType2 = "Sell";
BuyCcy2 = StringSubstr(OrderSymbol(), 3, 3);
SellCcy2 = StringSubstr(OrderSymbol(), 0, 3);
}//else
if ( (BuyCcy1 == BuyCcy2) || (SellCcy1 == SellCcy2) )
{
//Print("BalancedPair checks ", symbol, "(", sType1, ") -> blocked by ", OrderSymbol(), "(", sType2, ")");
//last.balance.block.time = TimeCurrent();
//last.balance.block.curr = OrderSymbol()+"-"+sType2;
//last.balance.block.type = sType1;
return(false);
}
}//for (int cc = OrdersTotal() - 1; cc >= 0; cc--)
//Got this far, so it is ok to send the trade
return(true);
}//End bool BalancedPair(int type)
>>>>>>>>>>>>>>>>>>>>>
Last edited by Pippopotamus on Mon Dec 10, 2012 11:17 am, edited 1 time in total.
Trading is Art
- cuzgeorge
- Trader
- Posts: 674
- Joined: Mon Mar 05, 2012 10:10 am
- Location: Johannesburg, South Africa.
Re: The New Beast!
Hi Pippo, Snoopier,
i am a little baffled how to get this done. I cant find anything in the simple beast similar to the snippet so i can make the changes.
I find something along these lines in slopey Beast, but obviously, i think this is meant for Simple Beast, right?. Help, please.
TIA and MIA for now
,
cuz
i am a little baffled how to get this done. I cant find anything in the simple beast similar to the snippet so i can make the changes.
I find something along these lines in slopey Beast, but obviously, i think this is meant for Simple Beast, right?. Help, please.
TIA and MIA for now
cuz
10.X, BMac,Xmeter,Marylin,and CaptsNakedTrading thread coupled with Slowkeys Intraday setup for manual trades.
http://www.stevehopwoodforex.com/phpBB3 ... f=36&t=848
http://www.stevehopwoodforex.com/phpBB3 ... f=36&t=848
- Pippopotamus
- Trader
- Posts: 70
- Joined: Wed Nov 16, 2011 2:32 pm
- Location: NY/NJ Metro Area
Re: The New Beast!
George, wish I could help, but I'm not a good coder. I must fiddle around with this until I get it to work... a tatons, comme toujours...
Trading is Art
- cuzgeorge
- Trader
- Posts: 674
- Joined: Mon Mar 05, 2012 10:10 am
- Location: Johannesburg, South Africa.
Re: The New Beast!
Thanks Pippo,Pippopotamus wrote:George, wish I could help, but I'm not a good coder. I must fiddle around with this until I get it to work... a tatons, comme toujours...
i'll keep trying. Something should 'Click' in my brain eventually.
regards and stay well.
cuz
10.X, BMac,Xmeter,Marylin,and CaptsNakedTrading thread coupled with Slowkeys Intraday setup for manual trades.
http://www.stevehopwoodforex.com/phpBB3 ... f=36&t=848
http://www.stevehopwoodforex.com/phpBB3 ... f=36&t=848
-
jlcgarcia
Re: The New Beast!
Hi,
I have replaced the old balanced pair function with the new posted by snoopier.
Please check if it functions correctly.
Regards
José Luis
I have replaced the old balanced pair function with the new posted by snoopier.
Please check if it functions correctly.
Regards
José Luis
You do not have the required permissions to view the files attached to this post.
Last edited by jlcgarcia on Tue Dec 11, 2012 5:27 pm, edited 2 times in total.
- cuzgeorge
- Trader
- Posts: 674
- Joined: Mon Mar 05, 2012 10:10 am
- Location: Johannesburg, South Africa.
Re: The New Beast!
Garcia to the rescue,!!!!!!!!!!!!
i knew we could count on you,
kind regards,
cuz
i knew we could count on you,
kind regards,
cuz
10.X, BMac,Xmeter,Marylin,and CaptsNakedTrading thread coupled with Slowkeys Intraday setup for manual trades.
http://www.stevehopwoodforex.com/phpBB3 ... f=36&t=848
http://www.stevehopwoodforex.com/phpBB3 ... f=36&t=848
- Pippopotamus
- Trader
- Posts: 70
- Joined: Wed Nov 16, 2011 2:32 pm
- Location: NY/NJ Metro Area
Re: The New Beast!
Muy amable de usted Jose Luis, muchisimas gracias...jlcgarcia wrote:Hi,
I have replaced the old balanced pair function with the new posted by snoopier.
Please check if it functions correctly.
Regards
José Luis
Trading is Art
- Pippopotamus
- Trader
- Posts: 70
- Joined: Wed Nov 16, 2011 2:32 pm
- Location: NY/NJ Metro Area
Re: The New Beast!
I have Simple Beast on 15 pairs. Looks like Snoopier, and Jose Luis have done great work. Again, thank you both. Currently have 2, "related," pairs in play, Sell xxx/Usd, and Sell Usd/xxx. Will now be monitoring recovery processes. George, what have you seen so far?
Trading is Art
- cuzgeorge
- Trader
- Posts: 674
- Joined: Mon Mar 05, 2012 10:10 am
- Location: Johannesburg, South Africa.
Re: The New Beast!
Pippo,
i have set up and not had a trade yet, 12 pairs, based on minimum spread from my crim.
I'm using a combination of a set file i picked up from JL a long time ago for this, and i changed the recovery to 1,1,2,4. cant remember what else right now. Will post that also on fxpage.
I also have'nt had time to update the fxpage but will be getting through it on the weekend i hope. I'm terribly bogged down right now with too much going on.
Even my live accounts i managed to recover , today, finally!, but lost one acct (ALPARI- and not showing) when when JPY opened so ridiculously Sunday night.
Hope this BEAST works out, i dont need so many pairs going in the same direction at the same time.
sorry to be vague, but will update ASAP.
Heres the link for shortcut,
http://www.myfxbook.com/members/cuzgeor ... ast/391172
Thanks Pippo for keeping us informed. I'm very curious to see how this works.
cuz
i have set up and not had a trade yet, 12 pairs, based on minimum spread from my crim.
I'm using a combination of a set file i picked up from JL a long time ago for this, and i changed the recovery to 1,1,2,4. cant remember what else right now. Will post that also on fxpage.
I also have'nt had time to update the fxpage but will be getting through it on the weekend i hope. I'm terribly bogged down right now with too much going on.
Even my live accounts i managed to recover , today, finally!, but lost one acct (ALPARI- and not showing) when when JPY opened so ridiculously Sunday night.
Hope this BEAST works out, i dont need so many pairs going in the same direction at the same time.
sorry to be vague, but will update ASAP.
Heres the link for shortcut,
http://www.myfxbook.com/members/cuzgeor ... ast/391172
Thanks Pippo for keeping us informed. I'm very curious to see how this works.
cuz
10.X, BMac,Xmeter,Marylin,and CaptsNakedTrading thread coupled with Slowkeys Intraday setup for manual trades.
http://www.stevehopwoodforex.com/phpBB3 ... f=36&t=848
http://www.stevehopwoodforex.com/phpBB3 ... f=36&t=848