Unable to load DLL 'winhttp.dll' or one of its dependencies

Created at 24 Nov 2022, 15:05
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
JW

jwandia2022

Joined 30.09.2022

Unable to load DLL 'winhttp.dll' or one of its dependencies
24 Nov 2022, 15:05


Hi,

I am trying to build this cbot from the indicator referenced below. 

However, I keep getting the error [Crashed in Initialize with DllNotFoundException: Unable to load DLL 'winhttp.dll'] when I try to run an instance of this cbot. What could be the issue.

Kindly advise.

Joyce.

 

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;

namespace cAlgo.Robots
{
    [Robot(AccessRights = AccessRights.None)]
    public class Swing : Robot
    {
        private Swing xyz;

        protected override void OnStart()
        {
            xyz = Indicators.GetIndicator<Swing>(Bars.ClosePrices, Bars.ClosePrices, 5);
        }

        protected override void OnBar()
        {
            var currentSwingHigh = xyz.SwingHighPlot.Last(0);
            var currentSwingLow = xyz.SwingLowPlot.Last(0);
            var Price = (Symbol.Ask + Symbol.Bid)/2;

            if ((Price > currentSwingLow)||(Price > currentSwingHigh))
            {
                Close(TradeType.Sell, "test");
                if (Positions.Count == 0)
                    ExecuteMarketOrder(TradeType.Buy, SymbolName, 1000, "Bullish", 50, 100);                    
            }
            if ((Price < currentSwingLow)||(Price < currentSwingHigh))
            {
                Close(TradeType.Buy, "test");
                if (Positions.Count == 0)
                    ExecuteMarketOrder(TradeType.Sell, SymbolName, 1000, "Bearish", 50, 100);                    
            }
        }
        
        private void Close(TradeType tradeType, string Label)
        {
            foreach (var position in Positions.FindAll(Label, SymbolName, tradeType))
                ClosePosition(position);
        }


    }
}

 


@jwandia2022