concretesubmarine.com/ FORUM

Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: The cBot is not entering trades.


Senior Member

Status: Offline
Posts: 257
Date:
The cBot is not entering trades.
Permalink   
 


Hi, I'm seeking help with my cBot. Apparently, it is not entering any trades, and I don't know why. I would also like to ask how to determine the timeframe the cBot is using or, specifically, what timeframe (the one that i am looking at?)the indicator has. Here is my cBot: 

//#reference: ..\Indicators\Indicatorbbb.algo


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public class BOTbbb : Robot
    {
        private Indicatorbbb Meini;

        [Parameter("Volume (Units)", DefaultValue = 10000, MinValue = 0)]
        public double VolumeInUnits { get; set; }

        [Parameter("Stop Loss (pips)", DefaultValue = 20, MinValue = 0)]
        public int StopLoss { get; set; }

        [Parameter("Take Profit (pips)", DefaultValue = 40, MinValue = 0)]
        public int TakeProfit { get; set; }

        protected override void OnStart()
        {
            Meini = Indicators.GetIndicator<Indicatorbbb>(2, MovingAverageType.WilderSmoothing);
        }

        protected override void OnBar()
        {

            if (Meini.haOpen.Last(1) < Meini.haClose.Last(1) &&
                Meini.haOpen.Last(0) > Meini.haClose.Last(0))
            {
                // Enter a long trade
                ExecuteMarketOrder(TradeType.Buy, Symbol, VolumeInUnits, "Long Trade", StopLoss, TakeProfit);
            }
        }
    }
}

 



__________________


Senior Member

Status: Offline
Posts: 176
Date:
Permalink   
 

You could check out platforms that offer a wide range of customizable options. Some platforms allow you to develop your own indicators based on specific criteria or strategies you follow. This can be particularly helpful if you have a unique approach or if the standard indicators don't fully meet your needs.

Custom trading indicators can definitely enhance your trading strategy. If you're looking to improve your trading performance, you might find it useful to explore some tools that allow you to create or use custom indicators. These can provide insights specific to your trading style and goals.



-- Edited by SaymonSax on Monday 2nd of September 2024 10:31:39 AM

__________________
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.



Create your own FREE Forum
Report Abuse
Powered by ActiveBoard