DISCLAIMER: THE CONTENT WITHIN THIS STRATEGY IS CREATED FROM TWO INDICATORS CREATED BY TWO PINESCRIPTER'S. THE STRATEGY WAS EXECUTED BY MYSELF AND REVERSE-ENGINEERED TO MEET THE CONDITIONS OF THE INTENDED STRATEGY REQUESTOR. I DO NOT TAKE CREDIT FOR THE CONTENT WITHIN THE ESTABLISHED LINES MADE CLEAR BY MYSELF.
This sampled strategy (Requested by @elemy_eth) is one combining previously created studies. I reverse-engineered the local scope for the Madrid moving average color plots and set entry and exit conditions for certain criteria met. This strategy is meant to deliver an extremely high hit rate on a daily time frame. This is made possible because of the very low take profit percentage, during the context of a macro downtrend it is made easier to hit 1-3% scalps which is made visible with the strategy using sampled scripts I created here.
How it works: Entry Conditions: -Enter Long's if the lime color conditions are met true using the script detailed by Marid's MA - No re-entry into positions needs to be met true (this prevents pyramiding of orders due to conditions being met true) applicable to both long and short side entries. - To increase hit rate and prevent traps both the parameters of rsi being sub 80 and no previously engulfing candles need to be met true to enter a long position. - Enter Short's if the red color conditions of Madrid's moving average are met true. - Closing Long positions are typically not met within this indicator, however, it still sometimes triggers if necessary. This consists of a pmarp sub 99 and a position size greater than 0.0 - Closing Short positions are typically not met within this indicator, however, it still sometimes triggers if necessary. This consists of a pmarp over 01 and a position size less than 0.0 - Stop Loss: 27.75% Take Profit: 1% (Which does not trigger on ticks over 1% so you will see average trade profits greater than 1%)
Added Horizontal Line's within the PMARP and a fill with options of the line's values and the transparency in between them. Both of these settings are adjustable in the input and style tabs. Thanks for the Boosts you guys, More is otw!! :) BYBIT:BTCUSDT
for anyone needing 3commas connection try copying this into the code:
//Alerts
Long_Entry = (lime_Long) and not (noREL) and not (noENGL) and not (rP) Long_Close = strategy.position_size > 0 and pmarp >= 99 and red_Short == true Short_Entry = (red_Short) and not (noRES) Short_exit = strategy.position_size < 0 and pmarp <= 01
if Long_Entry alert("{\n\"message_type\": \"bot\",\n\"bot_id\": [enter bot id here},\n\"email_token\": \"[enter email token here]\",\n\"delay_seconds\": 0}", alert.freq_once_per_bar_close)
if Long_Close alert("{\n\"action\": \"close_at_market_price\",\n\"message_type\": \"bot\",\n\"bot_id\": [enter bot id here},\n\"email_token\": \"[enter email token here]\",\n\"delay_seconds\": 0}", alert.freq_once_per_bar_close)
if Short_Entry alert("{\n\"message_type\": \"bot\",\n\"bot_id\": [enter bot id here},\n\"email_token\": \"[enter email token here]\",\n\"delay_seconds\": 0}", alert.freq_once_per_bar_close)
if Short_exit alert("{\n\"action\": \"close_at_market_price\",\n\"message_type\": \"bot\",\n\"bot_id\": [enter bot id here},\n\"email_token\": \"[enter email token here]\",\n\"delay_seconds\": 0}", alert.freq_once_per_bar_close)
- then set alert > alert function calls only > ensure the generic 3commas webhook url is input. This should work, still testing it though
hugomckenna
⋅
@hugomckenna, actually, use this instead so that you dont get random firing alerts; isLong = false // A flag for going LONG isLong := nz(isLong[1]) // Get the previous value of it
isSell = false // A flag for selling isSell := nz(isSell[1]) // Get the previous value of it
Long_Entry = (lime_Long) and not (noREL) and not (noENGL) and not (rP) and not isLong // Buy only if we are not already long Long_Close = strategy.position_size > 0 and pmarp >= 99 and red_Short == true and not isSell // Sell only if we are not already sold
isShort = false // A flag for going SHORT isShort := nz(isShort[1]) // Get the previous value of it
isBuyback = false // A flag for buying back isBuyback := nz(isBuyback[1]) // Get the previous value of it
Short_Entry = (red_Short) and not (noRES) and not isShort // Short only if we are not already short Short_exit = strategy.position_size < 0 and pmarp <= 01 and not isBuyback // Buyback only if we are not already Bought back