TradingView
Cretinon
22 nov 2016 11:29

JC_MacD_RSI_Candle_Strat_public 

Gold/U.S. DollarFXCM

Descrizione

//
// Author : Jacques CRETINON
// Last Version : V1.0 11-22-2016
//
// Risk disclaimer : Do not use this script in production environment. We assume no liability or responsibility for any damage to you, your computer, or your other property, due to the use of this script.
//
// Purpose of this script :
// 1- use same pine code for strategy or study script (with simple modifications)
// 2- be able to send alerts : enterlong, entershort, exitlong, exitshort, stoplosslong, stoplossshort, takeprofitlong, takeprofitshort in a study script like a strategy script should do
// 3- do not repaint (I HOPE)
//
// RoadMap :
// 1- manage : Trailing Stop Loss and Trailing Stop Loss offset
//
// I use this script :
// 1- with default value for XAUUSD, current chart resolution : 1mn, large timeframe : 15mn.
// 2- That's why I hard code MACD5 (5mn average), MACD15 (15mn average), MACD60 (1h average) ...
// 3- MACD, RSI (1mn and 15mn) and Candles info are my inputs to take any decisions
//
// I do not publish my enterLong, enterShort, exitLong and exitShort conditions (lines 204 to 207 are sample !) as they are not as perfect as I'd like. Fell free to use your own conditions :)
//
// Please, report me any bug, fell free to discuss and share. English is not my natural language, so be clement ;) Happy safe trading :)
Commenti
JustUncleL
I think the script should be set up for just "Strategy" or "Study", but currently it is actually set up for a mix of "strategy" and "study". What settings did you use to get the performance above?
Cretinon
hi @JustUncleL,

yes I use same script for startegy testing (commenting and uncommenting some lines) and when my strategy is ok (i.e. enterlong, entershort...) I copy/paste my enterlong, entershort value to my study script.

that way, I have all my alerts (alertcondition enterlong, enteershort...) set

I have to suppress my old alerts in tradingview (alerts are server side) and creating new one (expl : plot_info : enterLong) and i'll receive an email (and my auto trading bot too;)

Purpose of this script is to copy/paste enterlong, entershort... conditions between 2 scripts (one for strategy testing and one for alert) and have same result
Cretinon
with my enterlong, entershort, exitlong and exitshort :

performance overview : tinypic.com/view.php?pic=11htlb5&s=9
performance summary : tinypic.com/view.php?pic=2eweemp&s=9
Cretinon
@Cretinon, previous link down, hope this once is ok : imgur.com/a/W9xYW
Altro