CN109919773A - A kind of method of commerce and computer readable storage medium based on dynamic trend line - Google Patents
A kind of method of commerce and computer readable storage medium based on dynamic trend line Download PDFInfo
- Publication number
- CN109919773A CN109919773A CN201910256374.2A CN201910256374A CN109919773A CN 109919773 A CN109919773 A CN 109919773A CN 201910256374 A CN201910256374 A CN 201910256374A CN 109919773 A CN109919773 A CN 109919773A
- Authority
- CN
- China
- Prior art keywords
- price
- line
- sky
- doing
- lattice
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Abstract
The present invention relates to transaction to assist software technology field, more particularly to a kind of method of commerce and computer readable storage medium based on dynamic trend line, hoard situation at the end of by saving each K line, it is calculated at the end of K line and saves high price mean value, low price mean value, doing multivalence lattice and doing sky price for current K line is determined according to the K line in historical trading period, commission type and commission price are confirmed according to doing multivalence lattice and doing sky price and hoard situation, method provided by the invention can catch middle small band market, increase profit in trend market, reduce loss in earthquake market, it can make mistakes simultaneously to avoid manual operation, it can be improved the objectivity of transaction, stability, it avoids causing damages because of operation error, the transactional operation in process of exchange can be made more accurate quick.
Description
Technical field
The present invention relates to transaction to assist software technology field, in particular to a kind of transaction based on dynamic trend line
Method and computer readable storage medium.
Background technique
In the financial product such as process of exchange of futures, foreign exchange, transaction value is fast changing, manually operates trade fair
Many parameters are generated, the chance of operation is relatively more, but common investor manual operation is difficult to realize get a profit for a long time, and may be because
For phychology variation and there is unnecessary loss.In the prior art, the system of scalping of automation is typically only by equal line
The arrangement of index system and the opening and closing degree of Boll index system carry out the symbolic characteristic that market are extracted in quantitative analysis, can not be true
Fixed stable transaction opportunity and transaction value, adaptability are not strong enough.
Summary of the invention
In view of this, the embodiment of the present invention is designed to provide a kind of method of commerce based on dynamic trend line and calculating
Machine readable storage medium storing program for executing, to improve above-mentioned problem.
The embodiment of the invention provides a kind of method of commerce based on dynamic trend line, which comprises
When this transaction cycle K line initially forms, the hoard situation of current trading account is obtained in real time;According to present count
The previous transaction cycle K line of mesh determines doing multivalence lattice and doing sky price for this transaction cycle K line;Multivalence is done according to described
Lattice, the hoard situation confirmation commission type for doing sky price, newest concluded price and the current trading account and committee
Hold in the palm price.
Further, described to do multivalence lattice according to, described do sky price, newest concluded price and the current friendship
If it is no position in storehouse that the step of hoard situation confirmation commission type and commission price of easy account, which includes: current hoard situation,
And the newest concluded price less than or equal to it is described do sky price when, open hole capital after selling all securities to buy monovalence;If current hoard situation is not
There is a position in storehouse, and the newest concluded price is greater than or equal to described when doing multivalence lattice, opens more storehouses to sell monovalence.
Further, described to do multivalence lattice according to, described do sky price, newest concluded price and the current friendship
If the step of hoard situation confirmation commission type and commission price of easy account include: current hoard situation be hold more storehouses and
When the number that opens a position is less than preset times, when less than or equal to when doing sky price, to buy, monovalence is flat to open hole capital after selling all securities to newest concluded price more;
If current hoard situation is to hold hole capital after selling all securities and when the number that opens a position is less than preset times, when newest concluded price be greater than or equal to do it is more
When price, more storehouses are opened out of the void to sell monovalence.
Further, this transaction cycle K line according to preset number previous transaction cycle K line computation is done
Multivalence lattice determine to estimate with the previous transaction cycle K line of preset number for the step of doing sky price including: foundation acquisition does multivalence
It lattice and estimates and does sky price;Hoard situation at the end of according to previous transaction cycle K line, described estimate do multivalence lattice and described pre-
Estimate do sky price determine described in do multivalence lattice and described do sky price.
Further, described to do multivalence lattice according to determining estimate of the previous transaction cycle K line of the preset number obtained and do
The step of empty price includes: the high price mean value and low price for obtaining each K line in the previous transaction cycle K line of preset number respectively
Mean value;It is estimated according to multiple high price mean values determinations of acquisition and does multivalence lattice;It is equal according to multiple low price of acquisition
It is estimated described in value is determining and does sky price.
Further, the method also includes: if described estimate being calculated does multivalence lattice and does sky lower than described estimate
Described estimate then is done multivalence lattice and described estimate is done the numerical value of sky price and exchanged by price.
Further, which comprises
If there is no position in storehouse at the end of previous transaction cycle K line, if there is no position in storehouse at the end of previous transaction cycle K line, institute
It states and does multivalence lattice and meet following formula:
UpPrice=(upTemp+downTemp) * 0.5+diffUnit*basicPoint*0.5;
DownPrice=upPrice-diffUnit*basicPoint;
The upPrice does multivalence lattice described in being, the downPrice does sky price to be described, and the upTemp is institute
It states to estimate and does multivalence lattice, the downTemp is that described estimate does sky price, and the basicPoint is current trade variety
Minimum change price, the diffUnit are the multiple for doing multivalence lattice and doing the minimum change price differed between sky price.
Further, which comprises
If holding more storehouses at the end of previous transaction cycle K line, it is described do multivalence lattice and it is described do sky price meet it is as follows
Formula:
UpPrice=upTemp;
DownPrice=upPrice-diffUnit*basicPoint;
If holding hole capital after selling all securities at the end of previous transaction cycle K line, it is described do multivalence lattice and it is described do sky price meet it is as follows
Formula:
DownPrice=downTemp;
UpPrice=downPrice+diffUnit*basicPoint;Wherein, the upPrice does multivalence to be described
Lattice, the downPrice do sky price to be described, and the upTemp is that described estimate does multivalence lattice, and the downTemp is institute
It states to estimate and does sky price, the basicPoint is the minimum change price of current trade variety, and the diffUnit is more to do
Price and the multiple for doing the minimum change price differed between sky price.
Further, the method also includes: save hoard situation at the end of each transaction cycle K line, and according to
Default rule is determining and saves the high price mean value and low price mean value of the transaction cycle K line.
The present invention also provides a kind of computer readable storage medium, meter is stored on the computer readable storage medium
Calculation machine program, the computer program execute the above-mentioned method of commerce based on dynamic trend line when being run by processor.
Compared with the prior art, the invention has the following advantages:
A kind of method of commerce and computer readable storage medium based on dynamic trend line provided by the invention, passes through preservation
Hoard situation, high price mean value, the low price mean value of each K line determine that doing for current K line is more according to the K line in historical trading period
Price and sky price is done, confirms commission type and commission price according to doing multivalence lattice and doing sky price and hoard situation,
Middle small band market can be caught, increases profit in trend market, reduces loss in earthquake market, while can be to avoid people
Work operation error can be improved the objectivity of transaction, and stability avoids causing damages because of operation error, can make to trade
Transactional operation in the process is more accurate quick.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate
Appended attached drawing, is described in detail below.
Detailed description of the invention
It, below will be to use required in embodiment in order to illustrate more clearly of the technical solution of embodiment of the present invention
Attached drawing be briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not to be seen as
It is the restriction to range, it for those of ordinary skill in the art, without creative efforts, can be with root
Other relevant attached drawings are obtained according to these attached drawings.
Fig. 1 shows the schematic diagram of electronic equipment provided by the invention.
Fig. 2 shows the flow charts of the method for commerce provided by the invention based on dynamic trend line.
Fig. 3 shows the sub-step flow chart of S2.
Fig. 4 shows the sub-step flow chart of S21.
Appended drawing reference: 200- electronic equipment;The 210- network port;220- processor;230- communication bus;240- storage is situated between
Matter;250-I/O interface.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present invention, technical solution in the embodiment of the present invention carries out clear, complete
Ground description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Usually exist
The component of the embodiment of the present invention described and illustrated in attached drawing can be arranged and be designed with a variety of different configurations herein.Cause
This, is not intended to limit claimed invention to the detailed description of the embodiment of the present invention provided in the accompanying drawings below
Range, but it is merely representative of selected embodiment of the invention.Based on the embodiment of the present invention, those skilled in the art are not doing
Every other embodiment obtained under the premise of creative work out, shall fall within the protection scope of the present invention.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.
In the description of the present invention, it is also necessary to explanation, herein, such as first and second or the like relationship art
Language is only used to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying this
There are any actual relationship or orders between a little entities or operation.The terms "include", "comprise" or its it is any its
He is intended to non-exclusive inclusion by variant, so that the process, method, article or equipment including a series of elements is not
Only include those elements, but also including other elements that are not explicitly listed, or further include for this process, method,
Article or the intrinsic element of equipment.In the absence of more restrictions, being wanted by what sentence "including a ..." limited
Element, it is not excluded that there is also other identical elements in the process, method, article or apparatus that includes the element.For
For those skilled in the art, the concrete meaning of above-mentioned term in the present invention can be understood with concrete condition.
With reference to the accompanying drawing, it elaborates to some embodiments of the present invention.In the absence of conflict, following
Feature in embodiment and embodiment can be combined with each other.
Fig. 1 shows the embodiment of the present invention and provides the example hardware of electronic equipment that the application thought may be implemented and soft
The schematic diagram of part component.For example, processor 220 can be used on electronic equipment 200, and for executing the function in the application
Energy.
Electronic equipment 200 can be the computer of general purpose computer or specific use, both can be used to implement this Shen
The method of commerce based on dynamic trend line please.The application for convenience's sake can although illustrating only a computer
To realize function described herein in a distributed way on multiple similar platforms, loaded with equilibrium treatment.
For example, electronic equipment 200 may include the network port 210 for being connected to network, one for executing program instructions
A or multiple processors 220, communication bus 230 and various forms of computer readable storage mediums 240, for example, disk,
ROM or RAM, or any combination thereof.Illustratively, computer platform can also include being stored in ROM, RAM or other types
Non-transitory storage medium, or any combination thereof in program instruction.It may be implemented the application's according to these program instructions
Method.Electronic equipment 200 further includes input between computer and other input-output equipment (such as keyboard, display screen)/defeated
(Input/Output, I/O) interface 250 out.
For ease of description, a processor is only described in electronic equipment 200.It should be noted, however, that in the application
Electronic equipment 200 can also include multiple processors, therefore a processor described in this application execute the step of can also
It executes or is individually performed to be combined by multiple processors.For example, if the processor of electronic equipment 200 executes step A and step B,
Then it should be understood that step A and step B can also be executed jointly by two different processors or in a processor individually
It executes.For example, first processor executes step A, second processor executes step B or first processor and second processor
It is common to execute step A and B.
Referring to Fig. 2, Fig. 2 shows present embodiments provide a kind of method of commerce based on dynamic trend line, the side
Method includes S1~S3.
S1: when this transaction cycle K line initially forms, the hoard situation of current trading account is obtained.
Transaction cycle refers to the period that can be traded, for futures exchange, for example, this transaction cycle can be with
It is at 9 points in the morning of current trading day to 10 AM.In transaction cycle, when certain commodity or cargo carry out for the first time at
When the transaction of function, then it will form K line.The technique of painting of K line chart in stock market and forward market includes four data, i.e. opening price, most
At high price, lowest price, closing price, all K lines are all to reflect the situation and pricing information of the general trend of events around this four data expansion.
If daily K line chart is put on a sheet of paper, a day K line chart can be obtained, can also equally draw all K line charts, moon K line chart.
It should be noted that in four data for being included by K line in addition to opening price is fixed and invariable, highest
Valence, lowest price and closing price all generate variation real-time with trading situation, and in other words, it is dynamic that transaction, which is formed by K line,
, dynamic K line is initially formed from transaction, until this transaction Day Trading terminates to form final complete K line.
After the K line of this transaction cycle initially forms, the hoard situation of current trading account is obtained, hoard situation refers to
Account holds the case where goods ratio or commodity (or contract).For futures exchange, hoard situation can be no position in storehouse, that is, hold
Currency;Either hold position in storehouse, hold position including holding more storehouses or holding hole capital after selling all securities, before physical delivery or cash delivery expire, throws
Money person can determine contract of buying in or sell short according to market conditions and personal inclination of one's own accord.And investor (does more or does
It is empty) do not make delivery month and the equal contrary operation (sell or buy in) of quantity, hold futures contract, is then referred to as to hold position.
S2: doing multivalence lattice and doing according to this transaction cycle K line described in the previous transaction cycle K line computation of preset number
Empty price.
In transaction cycle, when each K line starts that time generated, calculating does multivalence lattice on this root K line
UpPrice and it is sky price downPrice.Before K line is not finished, selling monovalence, buying monovalence and most in the market is obtained in real time
New deal price lastPrice.It sells monovalence to refer in firm bargain, seller's valence minimum in real time, buys monovalence and refer to that firm offer is handed over
Yi Zhong, real-time highest buyer's valence, newest concluded price refer to such commodity in entire trade market it is newest once at
Concluded price when friendship.
In the calculating done sky price and do multivalence lattice, the K line according to the previous transaction cycle of preset number is calculated,
Preset number previous transaction cycle refers on the basis of current transaction cycle, in time sequencing to the transaction cycle of history into
Row counts, for example, 5 previous transaction cycles include: preceding 1st transaction cycle, preceding 2nd transaction cycle, preceding 3rd transaction week
Phase, preceding 4th transaction cycle and preceding 5th transaction cycle.In this present embodiment, referring to Fig. 3, S2 is according to before preset number
Doing multivalence lattice and doing sky price for this transaction cycle K line described in secondary transaction cycle K line computation includes following sub-step:
S21: it determines to estimate to do multivalence lattice and estimate according to the previous transaction cycle K line of preset number obtained and does sky valence
Lattice.
Preferably, referring to Fig. 4, S21 includes following sub-step S211~S213.
S211: the high price mean value and at a low price of each K line is obtained in preset number previous transaction cycle K line respectively
Value.
In this present embodiment, it is calculated after firm bargain each transaction cycle K line ultimately forms and saves the transaction
The high price mean value and low price mean value of period K line, the high price for obtaining each K line in the previous transaction cycle K line of preset number are equal
Value and low price mean value are the high price for directly acquiring each K line in the previous transaction cycle K line of pre-stored preset number
Mean value and low price mean value.Wherein, the previous transaction cycle K line of preset number can be denoted as k [1], k [2], k [3] ... k [kLen],
1st transaction cycle before k [1] refers on the basis of current transaction cycle, k [2] refer on the basis of current transaction cycle
Preceding 2nd transaction cycle, kLen can be the numerical value of default, such as 5, and kLen can also be the numerical value being set by the user.
It is to be appreciated that after obtaining preset number previous transaction cycle K line, also available each K line therewith
Its high price mean value is denoted as maH for this transaction cycle K line by high price mean value and low price mean value, its low price mean value is remembered
For maL.For previous transaction cycle K line, the high price mean value of n-th K line before current K line is indicated with maH [n].Than
If current K line is 6 with chronological order number, then maH [1] is the high price mean value numbered on the K line for being 5, and so on.Together
Reason, the low price average price of n-th K line before current K line is indicated with maL [n].
S212: it is estimated according to the determination of multiple high price mean values of acquisition and does multivalence lattice.
Preferably, the multiple high price mean values that will acquire therefrom are divided into two sequences according to the time sequencing of transaction cycle: left
Sequence and right side sequence.It is to be appreciated that left sided sequence refers to transaction cycle time forward data, when right side sequence refers to transaction cycle
Between data rearward, the quantity of the high price mean value in each group is the maximum integer no more than kLen/2, if kLen value is surprise
Number, then left sided sequence and right side sequence do not include the value of intermediate point.By taking kLen=5 as an example, left sided sequence be maH [5] and maH [4],
Right side sequence is maH [2] and maH [1].
The mean value for calculating separately left sided sequence and right side sequence, is denoted as HighLeftAvg and HighRightAvg, wherein
The mean value of the HighLeftAvg expression high terms of left sided sequence.By taking kLen=5 as an example, HighLeftAvg meets following formula:
HighLeftAvg=(maH [5]+maH [4])/halfLen.
Similarly, the mean value that the high terms of right side sequence are indicated with HighRightAvg, by taking kLen=5 as an example, HighRightAvg
Meet following formula:
HighRightAvg=(maH [2]+maH [1])/halfLen.
Wherein, halfLen refers to the integer of kLen half, such as halfLen=2 when kLen=4, when kLen=5
HalfLen=2.
When calculate high terms left sided sequence and right side sequence mean value after, then can calculate the slope of high terms.High terms are
Refer to the virtual straight line formed based on high price mean value, the slope of high terms is indicated with upRatio, then upRatio meets following public
Formula:
UpRatio=max ((HighLeftAvg-HighRightAvg)/halfLen, 0).
In this present embodiment, it is calculated according to the high price mean value maH [1] of previous transaction cycle and the high price line slope determined pre-
Estimate and do multivalence lattice, indicate to estimate with upTemp and do multivalence lattice, then estimates and do multivalence lattice and meet following formula:
UpTemp=maH [1]-upRatio.
S213: it is estimated according to the determination of multiple low price mean values of acquisition and does sky price.
It estimates and does the determination of sky price and estimate that do multivalence lattice similar with determining, first on acquisition front kLen root K line
Low price mean value maL [1], maL [2] ... maL [kLen];Then the low price mean value that will acquire is divided into two sequences in left and right, and divides
It Que Ding not left sided sequence mean value LowLeftAvg and right side sequence LowRightAvg.
Then the slope of low price line is determined according to LowLeftAvg and LowRightAvg, and low price line is indicated with downRatio
Slope, then low price line slope downRatio meets following formula:
DownRatio=max ((LowRightAvg-LowRightAvg)/halfLen, 0), wherein halfLen refers to
The integer of kLen half, such as halfLen=2 when kLen=4, halfLen=2 when kLen=5.
After determining low price line slope, then determined according to the low price mean value maL [1] and low price line slope of previous transaction cycle
It estimates and does multivalence lattice, indicate to estimate with upTemp and do multivalence lattice, then estimate and do multivalence lattice and meet following formula:
DownTemp=maL [1]+downRatio.
In this present embodiment, it primarily determines after estimating and doing multivalence lattice and estimate and do sky price, it is also necessary to which determining is estimated
Do multivalence lattice and estimate and do sky price and be compared, however, it is determined that estimate and do multivalence lattice and do sky price lower than determining estimating, then
It will estimate to do multivalence lattice and estimating and do the numerical value of sky price and exchange, to keep upTemp < downTemp.In other words, begin
It keeps estimating eventually and does multivalence lattice and do sky price not less than estimating.
S22: hoard situation at the end of according to previous transaction cycle K line, described estimate do multivalence lattice and described estimate is done
Empty price is determining to be done multivalence lattice and does sky price.
First to previous transaction cycle K line at the end of whether hold position in storehouse and judge, if previous transaction cycle K knot beam
When there is no position in storehouse, then do multivalence lattice, do sky price and meet following formula:
UpPrice=(upTemp+downTemp) * 0.5+diffUnit*basicPoint*0.5;
DownPrice=upPrice-diffUnit*basicPoint.
Wherein, multivalence lattice are done in upPrice expression, and sky price is done in downPrice expression, and upTemp expression, which is estimated, does multivalence
Lattice, downTemp expression, which is estimated, does sky price, and basicPoint is the minimum change price of current trade variety, minimum change valence
Lattice, minimum change price multiple be configured by user according to current tradable commodity type, such as screw-thread steel minimum change
1 yuan, 0.5 yuan of coking coal minimum change of unit price.DiffUnit is to do multivalence lattice and do the minimum change price differed between sky price
Multiple, i.e. diffPrice=(upPrice-downPrice)/basicPoint.For example the minimum change price of coking coal is
It 0.5 yuan, indicates when diffUnit=20 to do multivalence and do to differ 0.5*20=10 member between sky valence.The minimum of different commodity becomes
Dynamic price and to change multiple different, in real trade, can be obtained automatically according to the type of tradable commodity, can also be by
User is directly inputted by input-output equipment.
If trading account holds position in storehouse at the end of previous transaction cycle K line, according to hold bin type continue to do it is more
Price and do sky price.For example, doing multivalence lattice if holding more storehouses at the end of previous transaction cycle K line, doing sky price satisfaction
Following formula:
UpPrice=upTemp;
DownPrice=upPrice-diffUnit*basicPoint.
Wherein, multivalence lattice are done in upPrice expression, and sky price is done in downPrice expression, and upTemp expression, which is estimated, does multivalence
Lattice, basicPoint are the minimum change price of current trade variety, and diffUnit is to do multivalence lattice and do phase between sky price
The multiple of the minimum change price of difference.
If holding hole capital after selling all securities at the end of previous transaction cycle K line, multivalence lattice are done, sky price is done and meets following formula:
DownPrice=downTemp;
UpPrice=downPrice+diffUnit*basicPoint.
Wherein, multivalence lattice are done in upPrice expression, and sky price is done in downPrice expression, and downTemp expression, which is estimated, does sky valence
Lattice, basicPoint are the minimum change price of current trade variety, and diffUnit is to do multivalence lattice and do phase between sky price
The multiple of the minimum change price of difference.
S3: it multivalence lattice is done, described does holding for sky price, newest concluded price and the current trading account according to described
Storehouse situation confirmation commission type and commission price.
Specifically, according to hoard situation difference, following several situations can be divided into.It is there is no the case where position in storehouse first.
For example, if current hoard situation is no position in storehouse, and newest concluded price is less than or equal to when doing sky price, to buy
Monovalence opens hole capital after selling all securities.It opens hole capital after selling all securities and refers to and buy in, in futures exchange, buying in is Kai Duocang.
If current hoard situation is no position in storehouse, and newest concluded price opens more storehouses higher than when doing multivalence lattice to sell monovalence.
It opens more storehouses and refers to and sell, in futures exchange, sell as opening hole capital after selling all securities.
Newest concluded price refers in firm bargain, in the market the concluded price of a newest transaction, real in firm bargain
When minimum seller's valence, i.e. Pan Kou's sells 1 valence;In firm bargain, real-time highest buyer's valence, i.e. Pan Kou's buys 1 valence.In
In the present embodiment, in process of exchange, to the real-time highest of firm bargain buy house price buy 1 valence, firm bargain in real time most
Low seller's valence is obtained in real time, to ensure the authenticity of data.
When there is position in storehouse, then needs further determine how according to type of holding position and be entrusted.In the present embodiment
In, if current hoard situation is to hold more storehouses and when the number that opens a position is less than preset times, when newest concluded price is less than or equal to
To buy, monovalence is flat to open hole capital after selling all securities more when doing sky price;It is sold again in futures exchange, after buying in and opens hole capital after selling all securities as flat more, to buy 1 valence
It sells, can strike a bargain as early as possible, improve the efficiency of transactional operation.
If current hoard situation is to hold hole capital after selling all securities and when the number that opens a position is less than preset times, be higher than when newest concluded price or
When equal to doing multivalence lattice, more storehouses are opened out of the void to sell monovalence.It buys in again in futures exchange, after selling as opening more storehouses without foundation, with
It sells monovalence to be bought in, can strike a bargain as early as possible, improve the efficiency of transactional operation.
In this present embodiment, the preset number that opens a position is 2, in other embodiments of the invention, can also be other
Numerical value.
After confirmed to entrust type and entrust price, it can be entrusted according to determining commission type and commission price
Transaction.
In this present embodiment, the method also includes terminating in each transaction cycle, determine and store transaction cycle K
The step of position in storehouse of line, high price mean value and low price mean value.
At the time of each K knot beam, current position in storehouse situation is saved, while calculating the high price mean value maH of current K line
With low price mean value maL and saved, so that next K line uses.
For example, in this present embodiment, as highLineTyp=1, high price mean value maH meets following formula:
MaH=(high [1]+high [2]+... .high [kLen])/kLen.
If when highLineTyp=2, high price mean value maH meets following formula:
MaH=(max (open [1], close [1])+ax (open [2], close [2])+... .max (open [kLen],
close[kLen])/kLen。
Wherein, highLineTyp is the price type for being used to calculate high price mean value of user's input.HighLineTyp takes
Value is 1 or 2, and as highLineTyp=1, maH is calculated with high, and high refers to the highest price of entire transaction cycle K line,
As highLineTyp=2, maH is calculated with max (open, close), i.e., is calculated with the high price of K line entity, wherein
Open is the opening price of current K line, and close is the closing price of current K line.
As lowLineTyp=1, low price mean value maL meets following formula:
MaL=(low [1]+low [2]+... .low [kLen])/kLen.
As lowLineTyp=2, low price mean value maL meets following formula:
MaL=(min (open [1], close [1])+min (open [2], close [2])+... .min (open [kLen],
close[kLen])/kLen。
LowLineTyp is the price type that user's input is used to calculate low price mean value.LowLineTyp value is 1 or 2,
As lowLineTyp=1, maL is calculated with low;Low refers to the lowest price of current K line, as lowLineTyp=2, maH
It is calculated, i.e., is calculated with the low price of K line entity with min (open, close).Each can be determined according to above-mentioned formula
The high price mean value of transaction cycle K line, low price mean value are simultaneously stored, to use when the calculating of subsequent transaction cycle.
In conclusion a kind of method of commerce and computer-readable storage medium based on dynamic trend line provided by the invention
Matter can be counted by saving hoard situation, high price mean value, the low price mean value of each K line according to the K line in historical trading period
Calculation obtains doing multivalence lattice and does sky price, confirms commission type and committee according to doing multivalence lattice and doing sky price and hoard situation
Price is held in the palm, method provided by the invention can catch middle small band market, increase in trend market and get a profit, in earthquake market
Reduce loss, while can make mistakes to avoid manual operation, can be improved the objectivity of transaction, stability avoids because operation is lost
It accidentally causes damages, the transactional operation in process of exchange can be made more accurate quick.Compare other tracking Tendency Strategies, this
Kind mode can catch middle small band market, so it is considerable to get a profit in trend market, loss can be greatly decreased in earthquake market,
Such as pitch that do more method earning rates for extremely pitching more skies more stable using the equal line of long and short two root or MACD, gold than other strategies.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.
Claims (10)
1. a kind of method of commerce based on dynamic trend line, which is characterized in that the described method includes:
When this transaction cycle K line initially forms, the hoard situation of current trading account is obtained in real time;
Doing multivalence lattice and doing sky price for this transaction cycle K line is determined according to the previous transaction cycle K line of preset number;
Multivalence lattice, the hoard situation for doing sky price, newest concluded price and the current trading account are done according to described
Confirmation commission type and commission price.
2. the method for commerce as described in claim 1 based on dynamic trend line, which is characterized in that described to do multivalence according to
Lattice, the hoard situation confirmation commission type for doing sky price, newest concluded price and the current trading account and committee
Hold in the palm price the step of include:
If current hoard situation is no position in storehouse, and the newest concluded price less than or equal to it is described do sky price when, to buy
Monovalence opens hole capital after selling all securities;
If current hoard situation is no position in storehouse, and the newest concluded price be greater than or equal to it is described when doing multivalence lattice, to sell
Monovalence opens more storehouses.
3. the method for commerce as described in claim 1 based on dynamic trend line, which is characterized in that described to do multivalence according to
Lattice, the hoard situation confirmation commission type for doing sky price, newest concluded price and the current trading account and committee
Hold in the palm price the step of include:
If current hoard situation is to hold more storehouses and when the number that opens a position is less than preset times, when newest concluded price is less than or equal to
To buy, monovalence is flat to open hole capital after selling all securities more when doing sky price;
If current hoard situation is to hold hole capital after selling all securities and when the number that opens a position is less than preset times, when newest concluded price is greater than or equal to
When doing multivalence lattice, more storehouses are opened out of the void to sell monovalence.
4. the method for commerce as described in claim 1 based on dynamic trend line, which is characterized in that described according to preset number
This transaction cycle K line described in previous transaction cycle K line computation do multivalence lattice and the step of doing sky price, includes:
It determines to estimate to do multivalence lattice and estimate according to the previous transaction cycle K line of preset number obtained and does sky price;
Hoard situation at the end of according to previous transaction cycle K line, described estimate do multivalence lattice and described estimate that do sky price true
It is fixed described to do multivalence lattice and described do sky price.
5. the method for commerce as claimed in claim 4 based on dynamic trend line, which is characterized in that described default according to what is obtained
The previous transaction cycle K line of number, which determines to estimate, to be done multivalence lattice and includes: the step of doing sky price
The high price mean value and low price mean value of each K line in the previous transaction cycle K line of preset number are obtained respectively;
It is estimated according to multiple high price mean values determinations of acquisition and does multivalence lattice;
It is estimated according to multiple low price mean values determinations of acquisition and does sky price.
6. the method for commerce as claimed in claim 5 based on dynamic trend line, which is characterized in that the method also includes:
Sky price is done lower than described estimate if estimating described in being calculated and doing multivalence lattice, described estimate is done into multivalence lattice and institute
It states and estimates the numerical value for doing sky price and exchanged.
7. the method for commerce as claimed in claim 4 based on dynamic trend line, which is characterized in that the described method includes:
It is described to do multivalence lattice and meet formula if there is no position in storehouse at the end of previous transaction cycle K line:
UpPrice=(upTemp+downTemp) * 0.5+diffUnit*basicPoint*0.5;
DownPrice=upPrice-diffUnit*basicPoint;
The upPrice does multivalence lattice described in being, the downPrice does sky price to be described, and the upTemp is described pre-
Estimate and do multivalence lattice, the downTemp is that described estimate does sky price, and the basicPoint is the minimum of current trade variety
Variable price, the diffUnit are the multiple for doing multivalence lattice and doing the minimum change price differed between sky price.
8. the method for commerce as claimed in claim 4 based on dynamic trend line, which is characterized in that the described method includes:
It is described to do multivalence lattice and the sky price of doing meets formula if holding more storehouses at the end of previous transaction cycle K line:
UpPrice=upTemp;
DownPrice=upPrice-diffUnit*basicPoint;
It is described to do multivalence lattice and the sky price of doing meets formula if holding hole capital after selling all securities at the end of previous transaction cycle K line:
DownPrice=downTemp;
UpPrice=downPrice+diffUnit*basicPoint;Wherein, the upPrice does multivalence lattice, institute to be described
It states downPrice and does sky price to be described, the upTemp is that described estimate does multivalence lattice, and the downTemp estimates for described in
Do sky price, the basicPoint is the minimum change price of current trade variety, the diffUnit be do multivalence lattice and
Do the multiple of the minimum change price differed between sky price.
9. the method for commerce as claimed in claim 4 based on dynamic trend line, which is characterized in that the method also includes:
Hoard situation is saved at the end of each transaction cycle K line, and according to default rule determination and saves the transaction
The high price mean value and low price mean value of period K line.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium
Program executes when the computer program is run by processor and is based on dynamic trend line as claimed in any one of claims 1 to 9 wherein
Method of commerce.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910256374.2A CN109919773A (en) | 2019-04-01 | 2019-04-01 | A kind of method of commerce and computer readable storage medium based on dynamic trend line |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910256374.2A CN109919773A (en) | 2019-04-01 | 2019-04-01 | A kind of method of commerce and computer readable storage medium based on dynamic trend line |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109919773A true CN109919773A (en) | 2019-06-21 |
Family
ID=66967968
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910256374.2A Pending CN109919773A (en) | 2019-04-01 | 2019-04-01 | A kind of method of commerce and computer readable storage medium based on dynamic trend line |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109919773A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110781172A (en) * | 2019-09-29 | 2020-02-11 | 上海银赛计算机科技有限公司 | Calculation method, system and medium for flat bin threshold of option null head strategy |
-
2019
- 2019-04-01 CN CN201910256374.2A patent/CN109919773A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110781172A (en) * | 2019-09-29 | 2020-02-11 | 上海银赛计算机科技有限公司 | Calculation method, system and medium for flat bin threshold of option null head strategy |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20200210953A1 (en) | Systems and methods for improving the liquidity and distribution network for illiquid items | |
US11847703B2 (en) | Coupon blending of a swap portfolio | |
JP4897303B2 (en) | Trading tools to enhance the execution of stock price and commodity index orders | |
Easley et al. | The microstructure of the Flash Crash | |
US11379918B2 (en) | Coupon blending of a swap portfolio | |
US11423397B2 (en) | Generating a blended FX portfolio | |
JP2005234673A (en) | Trade timing decision support program and trade ordering system having the program | |
CN109919773A (en) | A kind of method of commerce and computer readable storage medium based on dynamic trend line | |
Garriott et al. | Retail order flow segmentation | |
US20160019643A1 (en) | Invoice Swap Spreads | |
US20140032442A1 (en) | Method and system for creating an issuance based securities index | |
Fang et al. | What Drives Jumps in the Secured Overnight Financing Rate? Evidence From the Arbitrage-Free Nelson–Siegel Model With Jump Diffusion | |
Koshiyama et al. | Mid-Curve Recommendation System: a Stacking Approach Through Neural Networks | |
Gikhman | FX Basic Notions and Randomization | |
Néba | Implementation of a portfolio construction method | |
KR20130131831A (en) | Device and method for option trading based on future price and profit calculation on each price in cyber stock trading system | |
CN114693442A (en) | Bond data processing method and device, electronic equipment and storage medium | |
CN114693455A (en) | Bond recommendation method and device | |
US20200279327A1 (en) | Risk reversal index | |
Chateau | Market valuation of firms | |
Hogan | Quantifying the Variance Risk Premium in VIX Options | |
Kilpeläinen | Venture Capital and Valuation Models | |
Holmberg et al. | Looking Over the Hedge, Currency Hedging of Stochastic Cash Flows | |
Milevsky et al. | Financial Economic Valuation of Guaranteed Minimum Withdrawal Benefits in Variable Annuities | |
UA76826U (en) | System for organization of program trading process |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190621 |