Page 6 of 8

Re: Trading_commands

PostPosted: Sun Feb 11, 2018 5:19 am
by Apprentice
Unfortunately Closed Trades table it does not provide information about the order type.
Close time is provided, so we can use this as a reference point.
With which indicator/strategy this will be used.

Re: Trading_commands

PostPosted: Sun Feb 11, 2018 9:34 pm
by 7000306337
Cordial thanks for your valuable time and reply. Much appreciated.

I`m not using any STANDARD INDICATOR or STRATEGY.

I`m struggling with a STRATEGY that I`m trying to create.
I got it working to enter() correctly and exit() correctly on a PegPriceOffsetPipsStop STOP or a PegPriceOffsetPipsLimit LIMIT.

The only problem left now is how to prevent entering() again till end of current candle.
Because for the rest of the current candle both enter() and exit() conditions are still simultaneously valid till end of current candle which results in thousands of enter() and exactly the same number of thousands of exit().

Wish there was a way (or a work around) to limit number of enter() per candle to ONLY ONE(1) trade.

Re: Trading_commands

PostPosted: Sun Feb 11, 2018 10:05 pm
by 7000306337
Thank you thank you ....

That is it ...
I will set a flag=true if enter() is executed once, to prevent entering() again.
And reset flag=false on each new candle.
That should work.
I`ll try it.

Re: Trading_commands

PostPosted: Mon Feb 12, 2018 7:20 am
by 7000306337
Sincerest Gratitude ... can`t thank you enough for your valuable time and mentor.

Just wanted to mention that the flag on ................................... enter() .... worked just fine.
I was trying to solve the wrong problem by trying to set a flag on ....... exit().
(there are many exits() and the STOP and LIMIT exits() are hard to track)

As always much much appreciated,
Thanks again.

Re: Trading_commands

PostPosted: Mon Feb 12, 2018 2:24 pm
by 7000306337
Hi:
Me again.

Just a quick question;
Can extSignale() be used in INDICATORS (any example)? or it is only for STRATEGIES.

If not is there a way to mimic it in INDICATORS?

txs,

Re: Trading_commands

PostPosted: Fri Feb 16, 2018 7:32 am
by Apprentice
Only for STRATEGIES.

Re: Trading_commands

PostPosted: Fri Jul 27, 2018 9:31 am
by alerander81
Hi Apprentice,

Thanks you very much for this indicator !

But in order to have more results, Is it possible to add these functions :

- We open a position, short or long, manually (example, a Buy position with 20 lots)

- Then the price reach first take profit (for example 6 pips, definied in indicator parameters), the indicator close 1/2 of this position automatically (10 lots so), and in the same time, the indicator move automactically the fixed stop to breakeaven + 1 pips.

- Then the price reach the second take profit (for example 12 pips, definied in indicator parameters), the indicator close again automatically 1/2 of the position (5 lots so), and again in the same time automatically change the fixed stop to trailing stop.

By this behaviour we secure trades with an automatic way with the breakeaven, as the same time as we have closed 75% of the position, with 25% is running if we have a market acceleration.

Thanks you in advance.

Re: Trading_commands

PostPosted: Mon Jul 30, 2018 9:57 am
by Apprentice
Your request is added to the development list under Id Number 4202

Re: Trading_commands

PostPosted: Mon Jul 30, 2018 12:29 pm
by Apprentice
There is a strategy which does almost exactly that. I modified it a little bit to fit exactly to the requirements.
Trailing_stop_limit_2.lua
(50.15 KiB) Downloaded 706 times

Trailing_stop_limit_all trades.lua
(51.76 KiB) Downloaded 710 times

Re: Trading_commands

PostPosted: Tue Jul 31, 2018 8:22 am
by alerander81
Hi,

I can't use the strategy when no trades are present on open positions.

Is it possible to activate the strategy (in stand-by mode) when no trades are open?
Then when we open a position the strategy detect this?

Thanks !