pk-hangjing No title
Python
study("EMA/SMA MTF BAND and PRICEACTION", overlay=true)
//Maband
A2 = security(tickerid, "1", sma(close, 100))//title='SMA5M'
B2 = security(tickerid, "1", sma(close, 300))//title='SMA15M'
C2 = security(tickerid, "1", sma(close, 600))//title='SMA30M'
D2 = security(tickerid, "1", sma(close, 1200))//title='SMA1H'
E2 = security(tickerid, "1", sma(close, 4800))//title='SMA4H'
A3 = security(tickerid, "1", ema(close, 100))//title='EMA5M'
B3 = security(tickerid, "1", ema(close, 300))//title='EMA15M'
C3 = security(tickerid, "1", ema(close, 600))//title='EMA30M'
D3 = security(tickerid, "1", ema(close, 1200))//title='EMA1H'
E3 = security(tickerid, "1", ema(close, 4800))//title='EMA4H'
//Mabandcolor
AL=plot(A2 , title='5MSMA', color=yellow,linewidth=1,transp=98)
BL=plot(A3 , title='5MEMA', color=yellow, linewidth=1,transp=98)
CL=plot(B2 , title='15MSMA', color=aqua, linewidth=1,transp=98)
DL=plot(B3 , title='15MEMA', color=aqua, linewidth=1,transp=98)
EL=plot(C2 , title='30MSMA', color=orange, linewidth=1,transp=98)
FL=plot(C3 , title='30MEMA', color=orange, linewidth=1,transp=98)
GL=plot(D2 , title='1HSMA', color=lime, linewidth=1,transp=98)
HL=plot(D3 , title='1HSMA', color=lime, linewidth=1,transp=98)
IL=plot(E2 , title='4HSMA', color=red, linewidth=1,transp=98)
JL=plot(E3 , title='4HEMA', color=red, linewidth=1,transp=98)
fill(AL,BL , title='5MBAND',color=yellow,transp=70)
fill(CL,DL , title='15MBAND',color=aqua,transp=70)
fill(EL,FL , title='30MBAND',color=orange,transp=70)
fill(GL,HL , title='1HBAND',color=lime,transp=70)
fill(IL,JL , title='4HBAND',color=red,transp=70)
//Priceaction
pctP = input(60, minval=1, maxval=99, title="カラカサ/トンカチの設定値")
pblb = input(2, minval=1, maxval=100, title="カラカサ/トンカチの期間")
pctS = input(5, minval=1, maxval=99, title="坊主の設定値")
spb = input(true, title="カラカサ/トンカチ")
ssb = input(true, title="坊主")
sib = input(true, title="はらみ足")
sob = input(true, title="包み足")
//PBar Percentages
pctCp = pctP * .01
pctCPO = 1 - pctCp
//Shaved Bars Percentages
pctCs = pctS * .01
pctSPO = pctCs
range = high - low
///PinBars
pBarUp() => spb and open > high - (range * pctCPO) and close > high - (range * pctCPO) and low <= lowest(pblb) ? 1 : 0
pBarDn() => spb and open < high - (range *  pctCp) and close < high-(range * pctCp) and high >= highest(pblb) ? 1 : 0
//Shaved Bars
sBarUp() => ssb and (close >= (high - (range * pctCs)))
sBarDown() => ssb and close <= (low + (range * pctCs))
//Inside Bars
insideBar() => sib and high <= high[1] and low >= low[1] ? 1 : 0
outsideBar() => sob and (high > high[1] and low < low[1]) ? 1 : 0
//PinBars
barcolor(pBarUp() ? lime : na,title="カラカサ/トンカチ上")
barcolor(pBarDn() ? red : na,title="カラカサ/トンカチ下")
plotshape(pBarUp(),title="カラカサ/トンカチ上2",style=shape.triangleup,text="PB",color=blue,textcolor=blue,location=location.belowbar)
plotshape(pBarDn(),title="カラカサ/トンカチ下2",style=shape.triangledown,text="PB",color=red,textcolor=red,location=location.abovebar)
//Shaved Bars
plotshape(sBarUp(),title="坊主上",style=shape.triangleup,color=aqua,location=location.belowbar)
plotshape(sBarDown(),title="坊主下",style=shape.triangledown,color=purple,location=location.abovebar)
//Inside and Outside Bars
barcolor(insideBar() ? yellow : na ,title="はらみ足")
barcolor(outsideBar() ? orange : na ,title="包み足")
//Alert
alertcondition(pBarUp() , title = "PU", message = "↑")
alertcondition(pBarDn() , title = "PD", message = "↓")
alertcondition(sBarUp() , title = "SU", message = "↑")
alertcondition(sBarDown() , title = "SD", message = "↓")
alertcondition(insideBar() , title = "IB", message = "転換")
alertcondition(outsideBar() , title = "OB", message = "転換")
anonymous No title
Python
import argparse
​
def _parse_to_dict(arg_string):
    k, vstr = arg_string.split('=')
    vlist = vstr.split('+')
    return {k: vlist}
​
parser = argparse.ArgumentParser()
parser.add_argument('-d', '--dict',
                    metavar='KEY=V1+V2+V3',
                    type=_parse_to_dict,
			required=True)
args = parser.parse_args()
​
d = args.dict
print(d)
anonymous No title
Python
The legendary "Eldorado"investment Fund has returned to the international cryptocurrency market in your country. 
 
10% BTC to each member of the club " Eldorado" 
10 % accrual to your bitcoin wallet every 2 days. 
9% Daily bonus to each member of the affiliate program. 
 
Free registration only on the official website of " Eldorado" 
https://eldor.cc#engbtc  
anonymous No title
Python
from collections import defaultdict
from enum import Enum
from itertools import chain
import random
from typing import Iterable, Iterator, List, Union

Card = Union["NormalCard", "Jorker"]


class Suit(Enum):
    HEART = 0
    CLAB = 1
    DIA = 2
    SPADE = 3

    @classmethod
    def display(cls, suit):
        return {cls.HEART: "❤️", cls.CLAB: "♣️", cls.DIA: "♦️", cls.SPADE: "♠️"}[suit]

    def __repr__(self):
        return f"{self.display(self)}"


class Rank(Enum):
    THREE = 3
    FOUR = 4
    FIVE = 5
    SIX = 6
    SEVEN = 7
    EIGHT = 8
    NINE = 9
    TEN = 10
    JACK = 11
    QUEEN = 12
    KING = 13
    ACE = 14
    DEUCE = 15

    @classmethod
    def display(cls, suit):
        dic = {
            cls.TEN: "T",
            cls.JACK: "J️",
            cls.QUEEN: "Q",
            cls.KING: "K",
            cls.ACE: "A",
            cls.DEUCE: "2",
        }
        if suit in dic:
            return dic[suit]
        return str(suit.value)

    def __repr__(self):
        return f"{self.display(self)}"


class NormalCard:
    def __init__(self, rank, suit):
        self.rank = rank
        self.suit = suit

    def __repr__(self):
        return f"{repr(self.rank)}{repr(self.suit)}"

    def __gt__(self, other):
        if self.rank.value > other.rank.value:
            return True
        elif self.rank.value < other.rank.value:
            return False
        return self.suit.value > other.suit.value

    def __hash__(self):
        return hash(repr(self))


class Jorker:
    def __repr__(self):
        return "Jo"

    def __hash__(self):
        return hash(repr(self))


class Deck:
    JORKER_NUM = 2
    normal_cards: List[Card] = [
        NormalCard(rank, suit) for rank in Rank for suit in Suit
    ]
    jorkers: List[Card] = [Jorker()] * JORKER_NUM
    cards = normal_cards + jorkers

    def __init__(self, jorker_num=2):
        random.shuffle(self.cards)
        self.it_cards = iter(self.cards)

    def deal(self, amount: int) -> Iterator[Card]:
        for _ in range(amount):
            yield next(self.it_cards)

    def reset(self, jorker_num=2):
        self.__init__(jorker_num)

    @classmethod
    def choices(cls, amount: int) -> List[Card]:
        return random.choices(cls.cards, k=amount)


def divide_cards(cards: List[Card]):
    normel_cards: List[NormalCard] = [
        card for card in cards if isinstance(card, NormalCard)
    ]
    jorkers: List[Jorker] = [card for card in cards if isinstance(card, Jorker)]
    return normel_cards, jorkers


class Hand:
    def __init__(self, cards: Iterable[Card]):
        self.normal_cards, self.jorkers = divide_cards(list(cards))
        self.normal_cards.sort()
        self.sorted_cards = self.normal_cards + self.jorkers

    def get_duplicates(self):
        rank_to_cards = defaultdict(list)
        for normal_card in self.normal_cards:
            rank_to_cards[normal_card.rank].append(normal_card)
        for rank in rank_to_cards.keys():
            rank_to_cards[rank].extend(self.jorkers)
        return [cards for (rank, cards) in rank_to_cards.items() if len(cards) >= 2]

    def get_sequences(self):
        suit_to_cards = {}
        for suit in Suit:
            same_suit_cards = [card for card in self.normal_cards if card.suit is suit]
            suit_to_cards[suit] = get_consectives(same_suit_cards, len(self.jorkers))
        sequences = list(chain.from_iterable(suit_to_cards.values()))
        return sorted(sequences, key=lambda seq: seq[0].rank.value)


def get_consectives(same_suit_cards: List[NormalCard], jorker_num: int):
    seqs = []
    for i, _ in enumerate(same_suit_cards):
        seq = get_seq(same_suit_cards[i:], jorker_num)
        if len(seq) >= 3:
            seqs.append(seq)
    return seqs


def get_seq(cards: List[NormalCard], jorker_num: int) -> List[Card]:
    """先頭から始まる最長のsequenceを返す"""
    ret: List[Card] = [cards[0]]
    for i, current_card in enumerate(cards[:-1]):
        next_card = cards[i + 1]
        delta = next_card.rank.value - current_card.rank.value
        if delta == 1:
            ret.append(next_card)
        elif delta == 2 and jorker_num >= 1:
            jorker_num -= 1
            ret.append(Jorker())
            ret.append(next_card)
        elif delta == 3 and jorker_num >= 2:
            jorker_num -= 2
            ret.extend([Jorker(), Jorker()])
            ret.append(next_card)
        else:
            break
        i += 1
    for _ in range(jorker_num):
        ret.append(Jorker())
    return ret


def get_max_length(arrays):
    if arrays:
        return max(map(lambda x: len(x), arrays))
    return 0


if __name__ == "__main__":
    result = {"deps": defaultdict(int), "seqs": defaultdict(int)}
    trial = 100
    for _ in range(trial):
        hand = Hand(Deck.choices(7))
        deps = hand.get_duplicates()
        seqs = hand.get_sequences()
        result["deps"][get_max_length(deps)] += 1
        result["seqs"][get_max_length(seqs)] += 1
    print(result)
anonymous No title
Python
hi there 
I have just checked harigami.jp for the ranking keywords and to see your SEO metrics and found that you website could use a boost. 
 
We will improve your SEO metrics and ranks organically and safely, using only whitehat methods 
 
Please check our pricelist here, we offer SEO at cheap rates. 
https://www.hilkom-digital.de/cheap-seo-packages/ 
 
Start boosting your business sales and leads with us, today! 
 
regards 
Hilkom Digital Team 
support@hilkom-digital.de
anonymous No title
Python
Hello!  harigami.jp 
 
Have you ever heard that you can send a message through the contact form? 
These forms are located on many sites. We sent you our message in the same way, and the fact that you received and read it shows the effectiveness of this method of sending messages. 
Since people in any case will read the offer received through the contact form. 
Our database includes more than 35 million websites from all over the world. 
The cost of sending one million messages 49 USD. 
There is a discount program for large orders. 
 
Free proof mailing of 50,000 messages to any country of your choice. 
 
This message is created automatically. Please use the contact details below to contact us. 
 
Contact us. 
Telegram - @FeedbackFormEU 
Skype  FeedbackForm2019 
Email - feedbackform@make-success.com
ガンマ@駆け出しエンジニア RCI投資戦略[レベル0交差]
Python
//@version=3
strategy("RCI投資戦略[レベル0交差]", overlay=false)
src = input(close, title="ソース")
mode = input(title="順張り[TRUE]/逆張り[FALSE]", type=bool, defval=false)
length = input(title="期間", defval=26, type=integer)

//RCI関数
ord(seq, idx, itv) =>
    p = seq[idx]
    o = 1
    for i = 0 to itv - 1
        if p < seq[i]
            o := o + 1
    o

d(itv) =>
    sum = 0.0
    for i = 0 to itv - 1
        sum := sum + pow((i + 1) - ord(src, i, itv), 2)
    sum

rci(itv) => (1.0 - 6.0 * d(itv) / (itv * (itv * itv - 1.0))) * 100.0

//RCIの計算
signal = rci(length)

//順張りと逆張りの入れ替え
l = mode ? 1 : 0
s = mode ? 0 : 1

//売買
longCondition = signal > 0 and signal[1] < 0
if (longCondition)
    strategy.entry("RCI Break Up", l)

shortCondition = signal < 0 and signal[1] > 0
if (shortCondition)
    strategy.entry("RCI Break Down", s)

//RCI描画
plot(signal, color=green)
ガンマ@駆け出しエンジニア RCI投資戦略[レベル]
Python
//@version=3
strategy("RCI投資戦略[レベル]", overlay=false)
src = input(close, title="ソース")
mode = input(title="順張り[TRUE]/逆張り[FALSE]", type=bool, defval=false)
length = input(title="期間", defval=26, type=integer)
upper = input(title="レベル[高]", defval=80, type=integer)
lower = input(title="レベル[低]", defval=-80, type=integer)

//RCI関数
ord(seq, idx, itv) =>
    p = seq[idx]
    o = 1
    for i = 0 to itv - 1
        if p < seq[i]
            o := o + 1
    o

d(itv) =>
    sum = 0.0
    for i = 0 to itv - 1
        sum := sum + pow((i + 1) - ord(src, i, itv), 2)
    sum

rci(itv) => (1.0 - 6.0 * d(itv) / (itv * (itv * itv - 1.0))) * 100.0

//RCIの計算
signal = rci(length)

//順張りと逆張りの入れ替え
l = mode ? 1 : 0
s = mode ? 0 : 1

//売買
longCondition = signal < lower
if (longCondition)
    strategy.entry("RCI Break Down", l)

shortCondition = signal > upper
if (shortCondition)
    strategy.entry("RCI Break Up", s)

//RCI描画
plot(signal, color=green)
ガンマ@駆け出しエンジニア RCI投資戦略[交差]
Python
//@version=3
strategy("RCI投資戦略[交差]", overlay=false)
src = input(close, title="ソース")
mode = input(title="順張り[TRUE]/逆張り[FALSE]", type=bool, defval=false)
fast = input(title="中期", defval=26, type=integer)
slow = input(title="長期", defval=52, type=integer)

//RCI関数
ord(seq, idx, itv) =>
    p = seq[idx]
    o = 1
    for i = 0 to itv - 1
        if p < seq[i]
            o := o + 1
    o

d(itv) =>
    sum = 0.0
    for i = 0 to itv - 1
        sum := sum + pow((i + 1) - ord(src, i, itv), 2)
    sum

rci(itv) => (1.0 - 6.0 * d(itv) / (itv * (itv * itv - 1.0))) * 100.0

//順張り逆張りの変更(数値の入れ替え)
f = mode ? rci(fast) : rci(slow)
s = mode ? rci(slow) : rci(fast)

//売買
longCondition = crossover(s, f)
if (longCondition)
    strategy.entry("RCI Cross Over", strategy.long)

shortCondition = crossunder(s, f)
if (shortCondition)
    strategy.entry("RCI Cross Under", strategy.short)

//RCI描画
plot(s, color=green)
plot(f, color=orange)
ガンマ@駆け出しエンジニア Moving Average 4Line
Python
//@version=3
study('Moving Average 4Line', overlay=true)
emaOrSma = input(title="EMA or SMA?", defval="EMA", options=["EMA", "SMA"])
maPeriodFast_1 = input(title="MA Period Fast 1", type=integer, defval=25, minval=1, maxval=10000)
maPeriodFast_2 = input(title="MA Period Fast 2", type=integer, defval=75, minval=1, maxval=10000)
maPeriodSlow_1 = input(title="MA Period Slow 1", type=integer, defval=100, minval=1, maxval=10000)
maPeriodSlow_2 = input(title="MA Period Slow 2", type=integer, defval=200, minval=1, maxval=10000)
showPerfectOrder = input(title="Show Perfect Order?", type=bool, defval=true)
fast_1 = emaOrSma == "EMA" ? ema(close, maPeriodFast_1) : sma(close, maPeriodFast_1)
fast_2 = emaOrSma == "EMA" ? ema(close, maPeriodFast_2) : sma(close, maPeriodFast_2)
slow_1 = emaOrSma == "EMA" ? ema(close, maPeriodSlow_1) : sma(close, maPeriodSlow_1)
slow_2 = emaOrSma == "EMA" ? ema(close, maPeriodSlow_2) : sma(close, maPeriodSlow_2)
perfectOrderByUpTrend = fast_1[1] > fast_2[1] and fast_2[1] > slow_1[1] and slow_1[1] > slow_2[1] ? true : false
perfectOrderByDownTrend = fast_1[1] < fast_2[1] and fast_2[1] < slow_1[1] and slow_1[1] < slow_2[1] ? true : false
plot(fast_1, color=orange)
plot(fast_2, color=red)
plot(slow_1, color=blue)
plot(slow_2, color=green)
bgcolor(perfectOrderByUpTrend and showPerfectOrder ? green : white, transp=90, offset=-1)
bgcolor(perfectOrderByDownTrend and showPerfectOrder ? orange : white, transp=90, offset=-1)
Don't you submit code?
Submit