Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Youtube-->https://youtu.be/tln2kvYGNLk
- int MACD=0;
- int RSI=0;
- void OnInit()
- {
- MACD=iMACD(_Symbol,PERIOD_CURRENT,12,26,9,PRICE_CLOSE);
- RSI=iRSI(_Symbol,PERIOD_CURRENT,14,PRICE_CLOSE);
- }
- void OnTick()
- {
- Comment( "Liena.P= ",IndicadorMACD(0),
- "\nSeñal= ",IndicadorMACD(1),
- "\nSeñal= ",IndicadorRSI(0)
- );
- }
- double IndicadorMACD(int Buffer)
- {
- double MACDArray[];
- ArraySetAsSeries(MACDArray,true);
- CopyBuffer(MACD,Buffer,0,2,MACDArray);
- return(NormalizeDouble(MACDArray[1],_Digits));
- }
- double IndicadorRSI(int Buffer)
- {
- double RSIArray[];
- ArraySetAsSeries(RSIArray,true);
- CopyBuffer(RSI,Buffer,0,2,RSIArray);
- return(NormalizeDouble(RSIArray[1],_Digits));
- }
Advertisement
Add Comment
Please, Sign In to add comment