OrglobalFx BreakEven cBOT v2.0 free

by orglobalng in category Trend at 21/03/2022
Description

Updated

Warning! Executing the following cBot may result in loss of funds. Use it at your own risk.
Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
Formula / Source Code
Language: C#
Trading Platform: cAlgo
//OrglobalFx_BreakEven cBOT
// orglobalng@gmail.com
// Will move stoploss to breakeven and trail the price.


using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.EasternStandardTime, AccessRights = AccessRights.None)]
    public class _OFX_CBOT_032421032022_BREAKEVEN_v2 : Robot
    {
        [Parameter("Instance Name", DefaultValue = "")]
        public string InstanceName { get; set; }
        [Parameter("Include Break-Even", DefaultValue = true, Group = "Protection")]
        public bool IncludeBreakEven { get; set; }
        [Parameter("Break-Even Trigger (pips)", DefaultValue = 100, MinValue = 1, Group = "Protection")]
        public int BreakEvenPips { get; set; }
        [Parameter("Break-Even Extra (pips)", DefaultValue = 100, MinValue = 1, Group = "Protection")]
        public int BreakEvenExtraPips { get; set; }
        [Parameter("Trail after Break-Even", DefaultValue = true, Group = "Protection")]
        public bool Includetrail { get; set; }
        [Parameter("Trailing Stop (pips)", DefaultValue = 100, MinValue = 1, Group = "Protection")]
        public int trailingstoppips { get; set; }


        protected override void OnStart()
        {
            // Put your initialization logic here

        }

        protected override void OnTick()
        {
            if (IncludeBreakEven)
            {
                BreakEvenAdjustment();
            }
        }

        #region Break Even
// code from clickalgo.com
        private void BreakEvenAdjustment()
        {
            var positn = Positions.Find(InstanceName, SymbolName);
            var allPositions = Positions.FindAll(InstanceName, SymbolName);

            foreach (Position position in allPositions)
            {
                var entryPrice = position.EntryPrice;
                var distance = position.TradeType == TradeType.Buy ? Symbol.Bid - entryPrice : entryPrice - Symbol.Ask;





// move stop loss to break even plus and additional (x) pips
                if (distance >= BreakEvenPips * Symbol.PipSize)
                {
                    if (position.TradeType == TradeType.Buy)
                    {
                        if (position.StopLoss <= position.EntryPrice + (Symbol.PipSize * BreakEvenExtraPips) || position.StopLoss == null)
                        {
                            // && position.Pips >= trailingstoppips)
                            if (Includetrail)
                            {
                                //ModifyPosition(position, position.EntryPrice);
                                position.ModifyStopLossPrice(position.EntryPrice + (Symbol.PipSize * BreakEvenExtraPips));
                                Print("Stop Loss to Break Even set for BUY position {0}", position.Id);

                                if (position.Pips >= trailingstoppips)
                                    position.ModifyTrailingStop(true);

                            }
                            else if (!Includetrail)
                            {
                                //ModifyPosition(position, position.EntryPrice + (Symbol.PipSize * BreakEvenExtraPips), position.TakeProfit);
                                position.ModifyStopLossPrice(position.EntryPrice + (Symbol.PipSize * BreakEvenExtraPips));
                                Print("Stop Loss to Break Even set for BUY position {0}", position.Id);
                            }
                        }
                    }
                    else
                    {
                        if (position.StopLoss >= position.EntryPrice - (Symbol.PipSize * BreakEvenExtraPips) || position.StopLoss == null)
                        {
                            // && position.Pips >= trailingstoppips)
                            if (Includetrail)
                            {
                                ModifyPosition(position, entryPrice - (Symbol.PipSize * BreakEvenExtraPips), position.TakeProfit);
                                Print("Stop Loss to Break Even set for SELL position {0}", position.Id);

                                if (position.Pips >= trailingstoppips)
                                    position.ModifyTrailingStop(true);
                            }
                            else if (!Includetrail)
                            {
                                ModifyPosition(position, entryPrice - (Symbol.PipSize * BreakEvenExtraPips), position.TakeProfit);
                                Print("Stop Loss to Break Even set for SELL position {0}", position.Id);

                            }
                        }
                    }

                }
            }
        }

        #endregion

        protected override void OnStop()
        {
            // Put your deinitialization logic here
        }


    }
}
Comments

icemanwork18 - March 22, 2022 @ 23:04

Where to Buy CSGO Prime Accounts?.
Buy CSGO Prime Account online for an affordable price and start your quality CSGO career. This gives you an excellent possibility of moving ahead in the game. You can select accounts that are at different ranks, that have miscellaneous kinds of skin, those with the most success ratio, and substantially more. It is very much like glancing for your patronage CSGO Service Medal account.

You can get the new accounts as per your choice, and once you finalize the account, you will be encouraged to make the payment by sending the account details to your email id. It is 100% safe and secure. Once you make the payment, your gaming career will start in Counter-Strike, and you will reach a new higher level.

Firstly, A Prime ranked Account of CSGO is one that has already completed hours of play. It is the one that has covered so much activity and surpassed a long winning streak. Secondly, all you need to do is buy the account from our marketplace and start gaming.

The conclusion is that buying a csgo ranked account will save a lot of time and lots of energy. You will also get the higher rank teammates who are like experienced players, and playing along with them makes the day perfect. So, For this, you need to spend a few dollars and grab a CSGO that will help you cross all those hackers and cheaters and help you play the game with a lot of enjoyment & Fair.


https://www.buyprimeaccount.com
https://www.csgoprimeaccount.com

alexfilan0921 - April 04, 2022 @ 09:56

Solitaire is a card game in which you play alone. It's a terrific game to play when travelling alone or when you're bored and looking for something to do because all you need is a basic deck of 52 cards. 

 In Klondike Solitaire game, the goal of the game is to get as many points as possible. The objective of the game is to move all of the cards to the "foundations," which are four more card stacks. 

junkangh89 - April 25, 2022 @ 11:03

It's great that there are so many possibilities now. Including for the game. It has become more than a hobby. Thanks to the online casino, I learned about new opportunities for playing and earning money. For me, the most important question is the withdrawal of money, and therefore I like it when everything is clear with this. I always read the information about the casino and the slot before making my choice. I found a review of the Vulkan Vegas and the terms of use suited me https://gry-hazardowe-za-darmo.com/vulkan-vegas-casino/ Everything is legal and fair, and for me, this is the main thing.

fiola123 - May 10, 2022 @ 05:18

Your information is very helpful. You want to experience the racing game for free download through the application asphalt 8 mod apk

0