Git Product home page Git Product logo

candletrailing's Introduction

CandleTrailing

Logic to determine if the current price is cheap or expensive in candlestick.

Description

First of all, this logic waits X% for candlestick formation. For example, if it is set to wait 50% on the daily chart, you will have to wait for half a day.
It is 30 minutes if it is 50% on 1 hour foot.

When the wait time is over, we record high and low candlesticks at that point.
It is a logic aimed at generating a buying signal at a price higher than the high price at this time and a selling signal at a price cheaper than the low price.

However, there is a possibility that this high / low will still be renewed, so if you generate a signal just by exceeding high price and low price, you will miss entries with better price.
Therefore, using the trailing stop method, we will update the price of signal generation every time we update highs and lows. From updating of high and low prices, if only Ypips goes backwards, it generates a signal.
(Conditions for backlighting are conditions that are more favorable than highs and lows at the end of waiting time)

Requirement

Install

  • Download CandleTrailing.mqh
  • Save the file to /MQL4/Includes

Usage

Includes header file.
#include <CandleTrailing.mqh>

Create an instance.
The first argument of the constructor is the trailing width (pips), and the second argument is the percentage of waiting time (%).

CandleTrailing *CT;

int OnInit()
{
   CT = new CandleTrailing(1, 50);
   return(INIT_SUCCEEDED);
}

It receives the judgment and executes processing according to the result.
0: No signal, 1: buy signal, -1: sell signal
int signal = CT.Signal();

candletrailing's People

Contributors

keisukeiwabuchi avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.