Scalping Algo

by waveridrfx in category Other at 06/08/2019
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
Download
69 downloads
How to install
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
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
        }
    }
}
Comments
0