Reply

Problem with opening multiple trades

6 replies

jack_jazz

Subscriber, bbp_participant, community, 48 replies.

Visit profile

9 years ago #112366

I would like to open up to 5 trades in the same direction in my strategy. In that case I’ve got 5 tabs for long trades,  each with diffrent magic number. Also 4 of (2-5) them include condition “market position is long”. Unfortunately it doesn’t work like it should.

What’s the reason?

 

Second thing I would like to do is to create condition which would be telling that bid can’t be lower than certain amount of pips below candel open – how to to this?

 

Thanks in advence.

0

JTamas

Subscriber, bbp_participant, community, 26 replies.

Visit profile

9 years ago #125396

I’m afraid you are not specific enough. The bug can be in the conditions as well. If you use pendings the broker might have a minimum distance rule from the price.

 

I’d like to use order position with a specified magic number instead of market position, for the utter is too general. If other positions are opened your overal market position might not be long even if your first long position is already in.

 

Other thing:

In every new bar, store the open price into a variable (with assign variable) then make another rule with the condition your wanted. (bid<"openprice variable" – converttorealpips("certain amount")

 

Cheers

T

0

jack_jazz

Subscriber, bbp_participant, community, 48 replies.

Visit profile

9 years ago #125398

I’m afraid you are not specific enough. The bug can be in the conditions as well. If you use pendings the broker might have a minimum distance rule from the price.

Conditions are fine, ea open trades as it should.

I’m not using pending orders, just market orders.

 

 

I’d like to use order position with a specified magic number instead of market position, for the utter is too general. If other positions are opened your overal market position might not be long even if your first long position is already in.

I’m not sure I’m getting this. Could you please tell me how to do this?

 

Thanks for your help.

0

JTamas

Subscriber, bbp_participant, community, 26 replies.

Visit profile

9 years ago #125399

Sure.

 

Instead of market position is long, use: order position is long (found in strategy control) and add the magic number of the previous position. So in this way the next order will only open when the previous has been activated.

 

T

0

jack_jazz

Subscriber, bbp_participant, community, 48 replies.

Visit profile

9 years ago #125400

Thank You for your help.

 

Just one more question – could You please tell me what is the difference between function “Is new Bar Open=true” and “IF (evaluate rule on bar open only)” ?

 

EDIT:

I did like You advice me, but it still doesn’t work.

I checked visaul tester and I’ve got only one trade open at a time.

1,2,3,4 – are the magic numbers of previous long trades – and on the screen You can see what I’ve got in my 5th tab for long.

File: tabs.jpgtabs.jpg

0

JTamas

Subscriber, bbp_participant, community, 26 replies.

Visit profile

9 years ago #125419

Well, the little box check is universal for the whole rule so it won’t be measured by the ea only at a new bar open. 

The is new bar open does the same but as a condition. If you want to place an order only at a new bar use that. If for example you want to speed up your testing, check all the money management stuff like moving the stops and such.

 

But this is just my interpretation, Mark can give you an official answere.

 

Of the problem, from here I can’t really tell what causes it, those where just the most common reasons I mentioned. Check the log and look for traits of these additional positions. If the orders were refused, or don’t appear at all.

 

I’m regularly using multiple positions in many ways so its not the program. You can attach the sqw file, I try to look at it.

 

T

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

9 years ago #125443

Hello,

 

it is difficult to say where the problem could be, could you post your strategy (sqw file) here?

I think there will be probably some error in logic.

 

 

Other thing:

In every new bar, store the open price into a variable (with assign variable) then make another rule with the condition your wanted. (bid<"openprice variable" – converttorealpips("certain amount")

 

This should be simple – Open[0] will return open price of current candle, you don’t need to use variable.

Mark
StrategyQuant architect

0

Viewing 6 replies - 1 through 6 (of 6 total)