Information

Username: zilva
Member since: 31 Jul 2015
Last login: 31 Jul 2015
Status: Active

Activity

Where Created Comments
Algorithms 0 5
Forum Topics 0 3
Jobs 0 0

Last Algorithm Comments

ZI
zilva · 9 years ago

@ Relax...

it is possible, just code what you want to do in onBar() instead of onTick().

 

@8051361

In easy Words.... It calculate all positions in one Direction to compensate Profit and Loss, then just added Take Profit.

 

@ Piratetunes, @ Conno123

Just ad a Stoploss in ExecuteMarketOrder (TradeType, Symbol, Volume, Label, STOPLOSS, TakeProfit, Marketrange, Comment)

 

Beste Grüße (Greetz)

zilva

ZI
zilva · 9 years ago

Yes, in the description is written one trade per bar.

For me is it still not necessary to open only one trade per bar, so i don't search for the Code to do that.

 

By the way, nice to help you ;)

ZI
zilva · 9 years ago

@ Conno123.

 

Okay, just found the Error.

replace this:

long ld_4 = Symbol.NormalizeVolume(gi_c + VolumeStep);

with this:

long ld_4 = Symbol.NormalizeVolume(gi_c + (VolumeStep * ic_g));

 

greetz

zilva

ZI
zilva · 9 years ago

@ Relax

Set New Parameter: 

[Parameter("Volume Step", DefaultValue = 1000, MinValue = 1000, Step = 1000)]
public int VolumeStep { get; set; }

 

And replace the Method n_lt(TradeType ca_8) with This:

private long n_lt(TradeType ca_8)
        {
            int ic_g = Grd_Ex(ca_8, ca_8);
            long gi_c = lt_8(ca_8);
            long ld_4 = Symbol.NormalizeVolume(gi_c + VolumeStep);
            return (ld_4);
        }

I did not tested this, but seems to be work.

ZI
zilva · 9 years ago

@SaifBD This is IMO the Max tradable Volume of a Symbol.

I mean to set myself the max i want to risk.

P.S. spike.bhv is my old ID.