READ-ONLY

The forum is now a read-only archive.

For bug reports & platform questions → [email protected]

Our community lives on Discord and YouTube — come join us!

Adding Positions

4 replies

daveM

Subscriber, bbp_participant, community, customer, sq-ultimate, 108 replies.

Visit profile

11 years ago #114388

I would like to add a position if the price has moved a certain number of pips from the last order.

 

Some questions.

 

How do I determine the price of the last active order, eg say there are two or three active orders, I would need a new reference point for each one or count from the original order.

 

Would I need a new rule for each additional order?

 

Can someone clarify this a bit, please

 

Thanks

 

daveM

0

Tomas Matejka

Administrator, sq-ultimate, 2 replies.

Visit profile

11 years ago #133759

If you only need to get price of last order you can create variable “lastOrderPrice” and set it to the value of:

  • bar close if you use market order
  • If you use stop/limit order set it stop/limit price

on every entry signal created by your EA.

Otherwise you would have to save and use different magic numbers for each individual order to control them all. This can be quite complicated if you use large amount of orders.

0

daveM

Subscriber, bbp_participant, community, customer, sq-ultimate, 108 replies.

Visit profile

11 years ago #133764

Thanks tomas.

 

I used the variable and got it to work well.

 

daveM

0

Rocksolidfx

Subscriber, bbp_participant, community, 39 replies.

Visit profile

10 years ago #137563

please explain i’m new to coding.. I just wish to add to a simple moving average example given if condition are true. kindly what is the code for this. Thank you 

0

Tomas Matejka

Administrator, sq-ultimate, 2 replies.

Visit profile

10 years ago #137686

please explain i’m new to coding.. I just wish to add to a simple moving average example given if condition are true. kindly what is the code for this. Thank you 

 

Hello, can you describe in more details what you want it to do? I can do an example then

0

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