Category Other  Published on 06/08/2019

Scalping Algo

Description

Hey! I need help, I'm following a really good trader but he's scalping and I keep missing the trades. 

He's given me access to connect to his API, i have the documentation to his socket. 

He's given me an API Key too. 

Can someone help me connect this to cTrader? In return you'll also have access to my API key and all the trades to test. THANKYOU! 

Trader 'My sockets uses socket-io to provide our event signals that are derived from segments of complex models in real-time.

Javascript example:

   var socket = io('https://XXXXXXXXX.com:5000?token=YOUR_API_KEY');
     // Connection succeeded
socket.on('connect', () => {
	
});
  // Connection lost
socket.on('disconnect', () => {
 
});

  socket.on('EURUSD', function(data) {
    if(data.text == "CLOSE_DC"){ //If our data provider goes offline
    
    }else if(data.text == "CLOSE"){ //If the trade we are working with closes
    
    }else if(data.text == "OPEN"){ //If the trade signal is a new trade
    
     }
   })
Replace with pair you want to listen to  = Pair code written in bold
  • EURUSD Euro/US Dollar
  • BTCUSD Bitcoin/US Dollar
  • USDJPY US Dollar/Japanese Yen
  • GBPUSD British Pound/US Dollar
  • AUDUSD Australian Dollar/US Dollar
  • USDCAD US Dollar/Canadian Dollar
  • USDCHF US Dollar/Swiss Franc
  • EURGBP Euro/British Pound
  • NZDUSD New Zealand Dollar/US Dollar
  • AUDJPY Australian Dollar/Japanese Yen
  • GBPJPY British Pound/Japanese Yen
  • GBPAUD British Pound/Australian Dollar
  • AUDNZD Australian Dollar/New Zealand Dollar
  • USDMXN US Dollar/Mexican Peso
  • ETHUSD Ethereum/US Dollar
  • EURCAD Euro/Canadian Dollar
  • EURJPY Euro/Japanese Yen
  • USDTRY US Dollar/Turkish Lira
  • USDZAR US Dollar/South African Rand
  • XAUUSD Gold/US Dollar

Data object

  • pair | Pair of the trade
  • type | If it's SHORT or LONG
  • price | current price of the trade [start price if we are opening, close price if the trade is closing]
  • unitSize | unit size bought from our algorithm
  • timestamp
  • stopPrice | Stop price for the trade
  • comment | Remarks for the trade

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.UTC, AccessRights = AccessRights.None)]
    public class NewcBot : Robot
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }

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

        protected override void OnTick()
        {
            // Put your core logic here
        }

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


WA
waveridrfx

Joined on 06.08.2019

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: New cBot (5).algo
  • Rating: 0
  • Installs: 2141
Comments
Log in to add a comment.
EU
eugengerd21 · 1 year ago

Looking for a way to stay up to date with the latest music? Look no further than Radiofmluisteren! This website offers users the ability to listen to radio online, anytime, anywhere. With a wide variety of stations to choose from, there is something for everyone. Whether you are looking for the latest hits or classic tunes, Radiofmluisteren has you covered. So why wait? Start listening today!

HA
Hatting · 4 years ago

Can help you :)