forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Software

Create and Test Forex Strategies

You are not logged in. Please login or register.


Forex Software → Technical Indicators → Custom indi and position info

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 4

Topic: Custom indi and position info

Can custom indi in FST obtain information whether position has been opened before or not? Example: multiple FST's are running, one FST opens position but the aim is to allow only one open position at any given point, meaning that other FST's won't act on their trading signals until no postions are open.

If it is possible to do in a custom indi, how to achieve this?

Re: Custom indi and position info

I think I added such function in some of the modified experts. Probably this one: http://forexsb.com/forum/post/13741/#p13741.
...
We can make a sticky post or a wiki page for the useful expert modifications. Most of the time this is a short functions that can be easily added to the expert.

Re: Custom indi and position info

Thanks! I'm wondering now how did I miss that post... Definitely a sticky post of useful expert modifications is needed!

Re: Custom indi and position info

This function:

for (int i = 0; One_Position_Only && i < OrdersTotal(); i++)
{
    OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
    if (OrderType() == OP_BUY || OrderType() == OP_SELL)
    {
        LastError = 0;
        return (0);
    }
}

Can be easily modified to monitor and reject further order if there is open position for a specific magic number or symbol or opened amount.

Posts: 4

Pages 1

You must login or register to post a reply

Forex Software → Technical Indicators → Custom indi and position info

Similar topics in this forum