Information

Username: ColossusFX
Member since: 27 Aug 2015
Last login: 27 Aug 2015
Status: Active

Activity

Where Created Comments
Algorithms 0 31
Forum Topics 9 27
Jobs 0 0

Last Algorithm Comments

CO
ColossusFX · 7 years ago

Thanks for this! I cannot trade without this now!

CO
ColossusFX · 7 years ago

:)

CO
ColossusFX · 8 years ago

Put this at the top

[Parameter("Stop Loss", DefaultValue = 10)]
        public int StopLoss { get; set; }

Copy below section and paste whole section, or simply add StopLoss after Label.

private int OrderSend(TradeType tradeType, long volumeToUse)
        {
            var returnResult = 0;
            if (volumeToUse > 0)
            {
                var result = ExecuteMarketOrder(tradeType, Symbol, volumeToUse, Label, StopLoss, 0, 0, "smart_grid");

                if (result.IsSuccessful)
                {
                    Print(tradeType, "Opened at: ", result.Position.EntryPrice, result.Position.StopLoss);
                    returnResult = 1;
                }
                else
                    Print(tradeType, "Openning Error: ", result.Error);
            }
            else
                Print("Volume calculation error: Calculated Volume is: ", volumeToUse);
            return returnResult;
        }

CO
ColossusFX · 8 years ago

I figured it out :)

CO
ColossusFX · 8 years ago

is this correct for referencing and changing HTF HMA?

        [Parameter("HMA HTF Period", DefaultValue = 1, MinValue = 1, MaxValue = 200, Step = 1)]
        public double Parameter { get; set; }

I need to change HMA on the set timeframe.

CO
ColossusFX · 8 years ago

@Paul_Hayes

Thanks very much for this, my scalping algo was just just causing havoc on big moves, this is exactly what I wanted to do with it!

Wanted a higher TF HMA for larger direction for opening trades, and you did it! :)

CO
ColossusFX · 8 years ago

Has anyone got a working stop loss feature?

Could they possibly share the code?

I have built with a stoploss code, but it does not actually set the stop loss.

Thanks