Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#include #include //--- indicator settings #property indicator_chart_window #property indicator_buffers 4 #property indicator_type1 DRAW_ARROW #property indicator_width1 1 #property indicator_color1 OxFFAAOO #property indicator_label1 Buy #property indicator_type2 DRAW_ARROW

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
#include #include //--- indicator settings #property indicator_chart_window #property indicator_buffers 4 #property indicator_type1 DRAW_ARROW #property indicator_width1 1 #property indicator_color1 OxFFAAOO #property indicator_label1 "Buy" #property indicator_type2 DRAW_ARROW #property indicator_width 2 1 #property indicator_color2 0x0000FF #property indicator_label2 "Sell" #property indicator_type 3 DRAW_ZIGZAG #property indicator_style3 STYLE_SOLID #property indicator_width3 1 #property indicator_color3 OXFOEDE6 #property indicator_label3 "Buy" #property indicator_type4 DRAW_ZIGZAG #property indicator_style4 STYLE_SOLID #property indicator_width4 1 #property indicator_color4 OxFFAAOO #property indicator_label4 "sell" 1/--- indicator buffers double Buffer1(); double Buffer2(); double Buffer3(); double Buffer4[]; datetime time_alert; //used when sending alert extern bool Audible_Alerts = true; extern bool Push_Notifications = true; double myPoint; initialized in Onlnit void myAlert(string type, string message) { if(type == "print") Print(message); else if(type == "error") { Print(type+" | ichimoku pp @ "+Symbol()+","+ Integer ToString(Period())+" | "+message); } else if(type == "order") { } else if(type == "modify") { else if(type = indicator") { if(Audible_Alerts) Alert(type+" | ichimoku pp @ "+Symbol()+","+IntegerToString(Period())+" || "+message); if(Push_Notifications) SendNotification(type+" | ichimoku pp @ "+Symbol()+","+ IntegerToString(Period())+" | "+message); } } // Custom indicator initialization function I 17+ int Onlnit() { IndicatorBuffers(4); SetIndexBuffer(0, Buffer1); SetIndexEmpty Value(0, EMPTY_VALUE); SetIndexEmptyValue(0, EMPTY_VALUE); SetIndexArrow(0, 241); SetindexBuffer(1, Buffer2); SetIndexEmpty Value(1, EMPTY_VALUE); SetindexArrow(1, 242); SetIndexBuffer(2, Buffer 3); SetIndexEmptyValue(2, EMPTY_VALUE); SetIndexBuffer(3, Buffer4); SetIndexEmptyValue(3, EMPTY_VALUE); //initialize myPoint myPoint = Point(); if(Digits() == 5 || Digits() == 3) { myPoint *= 10; } return(INIT_SUCCEEDED); } { if (i >= Math Min(5000-1, rates_total-1-50)) continue; //omit some old rates to prevent "Array out of range" or slow calculation //Indicator Buffer 1 if(ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_TENKANSEN, i) ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_KIJUNSEN, i) //Ichimoku Kinko Hyo is equal to Ichimoku Kinko Hyo && ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_TENKANSEN, I) > ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_SENKOUSPANA, i) //Ichimoku Kinko Hyo > Ichimoku Kinko Hyo && ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_TENKANSEN, i) 50 //Relative Strength Index > fixed value && iSAR(NULL, PERIOD_CURRENT, 0.02, 0.2, i) = 0; i--) { if (i >= Math Min(5000-1, rates_total-1-50)) continue; //omit some old rates to prevent "Array out of range" or slow calculation //Indicator Buffer 1 == if(ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_TENKANSEN, i) ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_KIJUNSEN, 1) I/Ichimoku Kinko Hyo is equal to Ichimoku Kinko Hyo && ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_TENKANSEN, i) > ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_SENKOUSPANA, i) //Ichimoku Kinko Hyo > Ichimoku Kinko Hyo && ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_TENKANSEN, i) 50 //Relative Strength Index > fixed value && iSAR(NULL, PERIOD_CURRENT, 0.02, 0.2, i) Open [1+i) //Ichimoku Kinko Hyo > Candlestick Open && iRSI(NULL, PERIOD_CURRENT, 7, PRICE_CLOSE, i) ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_KIJUNSEN, i) //Parabolic SAR > Ichimoku Kinko Hyo ) { Buffer2[i] = ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_KIJUNSEN, i); // Set indicator value at Ichimoku Kinko Hyo if(i == 1 && Time[1] != time_alert) myAlert("indicator", "Sell"); //Alert on next bar open time_alert = Time[1]; } else { Buffer2[i] = EMPTY_VALUE; } //Indicator Buffer 3 if(ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_TENKANSEN, I) > ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_KIJUNSEN, I) && ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_TENKANSEN, i+1) ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_TENKANSEN, i+1) //Ichimoku Kinko Hyo crosses below Ichimoku Kinko Hyo ) { Buffer 4 [i] = Low[i]; //Set indicator value at Candlestick Low if(i == 1 && Time[1] != time_alert) myAlert("indicator", "sell"); //Alert on next bar open time_alert = Time[1]: } else { Buffer4[i] = EMPTY_VALUE; } ) { Buffer4 [i] = Low[i]; //Set indicator value at Candlestick Low if(i == 1 && Time[1] != time_alert) myAlert("indicator", "sell"); //Alert on next bar open time_alert = Time[1]; } else { Buffer4 [i] = EMPTY_VALUE; } } return(rates_total); } // + Stock Screener Text Notes Pine Editor Strategy Tester Trading Panel Untitled Script 1 | 2 #include 3 #include 4 5 //--- indicator settings #property indicator_chart_window 7 #property indicator_buffers 4 6 8 9 10 11 12 13 14 #property indicator_type1 DRAW_ARROW #property indicator_width1 1 #property indicator_colori exFFAADO #property indicator_labeli "Buy" Add to Chart operation failed, reason: Script could not be translated from: null Stock Screener Text Notes Pine Editor Strategy Tester Trading Panel Untitled Script 1 2 #include 3 #include //--- indicator settings #property indicator_chart_window 7 #property indicator_buffers 4 9 #property indicator_type1 DRAW_ARROW #property indicator_width1 1 11 #property indicator_color1 OxFFAADO 12 #property indicator_label1 "Buy" 13 4 5 6 8 10 #include //--- indicator settings #property indicator_chart_window #property indicator_buffers 4 #property indicator_type1 DRAW_ARROW #property indicator_width1 1 #property indicator_color1 OxFFAAOO #property indicator_label1 "Buy" #property indicator_type2 DRAW_ARROW #property indicator_width 2 1 #property indicator_color2 0x0000FF #property indicator_label2 "Sell" #property indicator_type 3 DRAW_ZIGZAG #property indicator_style3 STYLE_SOLID #property indicator_width3 1 #property indicator_color3 OXFOEDE6 #property indicator_label3 "Buy" #property indicator_type4 DRAW_ZIGZAG #property indicator_style4 STYLE_SOLID #property indicator_width4 1 #property indicator_color4 OxFFAAOO #property indicator_label4 "sell" 1/--- indicator buffers double Buffer1(); double Buffer2(); double Buffer3(); double Buffer4[]; datetime time_alert; //used when sending alert extern bool Audible_Alerts = true; extern bool Push_Notifications = true; double myPoint; initialized in Onlnit void myAlert(string type, string message) { if(type == "print") Print(message); else if(type == "error") { Print(type+" | ichimoku pp @ "+Symbol()+","+ Integer ToString(Period())+" | "+message); } else if(type == "order") { } else if(type == "modify") { else if(type = indicator") { if(Audible_Alerts) Alert(type+" | ichimoku pp @ "+Symbol()+","+IntegerToString(Period())+" || "+message); if(Push_Notifications) SendNotification(type+" | ichimoku pp @ "+Symbol()+","+ IntegerToString(Period())+" | "+message); } } // Custom indicator initialization function I 17+ int Onlnit() { IndicatorBuffers(4); SetIndexBuffer(0, Buffer1); SetIndexEmpty Value(0, EMPTY_VALUE); SetIndexEmptyValue(0, EMPTY_VALUE); SetIndexArrow(0, 241); SetindexBuffer(1, Buffer2); SetIndexEmpty Value(1, EMPTY_VALUE); SetindexArrow(1, 242); SetIndexBuffer(2, Buffer 3); SetIndexEmptyValue(2, EMPTY_VALUE); SetIndexBuffer(3, Buffer4); SetIndexEmptyValue(3, EMPTY_VALUE); //initialize myPoint myPoint = Point(); if(Digits() == 5 || Digits() == 3) { myPoint *= 10; } return(INIT_SUCCEEDED); } { if (i >= Math Min(5000-1, rates_total-1-50)) continue; //omit some old rates to prevent "Array out of range" or slow calculation //Indicator Buffer 1 if(ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_TENKANSEN, i) ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_KIJUNSEN, i) //Ichimoku Kinko Hyo is equal to Ichimoku Kinko Hyo && ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_TENKANSEN, I) > ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_SENKOUSPANA, i) //Ichimoku Kinko Hyo > Ichimoku Kinko Hyo && ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_TENKANSEN, i) 50 //Relative Strength Index > fixed value && iSAR(NULL, PERIOD_CURRENT, 0.02, 0.2, i) = 0; i--) { if (i >= Math Min(5000-1, rates_total-1-50)) continue; //omit some old rates to prevent "Array out of range" or slow calculation //Indicator Buffer 1 == if(ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_TENKANSEN, i) ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_KIJUNSEN, 1) I/Ichimoku Kinko Hyo is equal to Ichimoku Kinko Hyo && ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_TENKANSEN, i) > ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_SENKOUSPANA, i) //Ichimoku Kinko Hyo > Ichimoku Kinko Hyo && ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_TENKANSEN, i) 50 //Relative Strength Index > fixed value && iSAR(NULL, PERIOD_CURRENT, 0.02, 0.2, i) Open [1+i) //Ichimoku Kinko Hyo > Candlestick Open && iRSI(NULL, PERIOD_CURRENT, 7, PRICE_CLOSE, i) ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_KIJUNSEN, i) //Parabolic SAR > Ichimoku Kinko Hyo ) { Buffer2[i] = ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_KIJUNSEN, i); // Set indicator value at Ichimoku Kinko Hyo if(i == 1 && Time[1] != time_alert) myAlert("indicator", "Sell"); //Alert on next bar open time_alert = Time[1]; } else { Buffer2[i] = EMPTY_VALUE; } //Indicator Buffer 3 if(ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_TENKANSEN, I) > ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_KIJUNSEN, I) && ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_TENKANSEN, i+1) ilchimoku(NULL, PERIOD_CURRENT, 9, 26, 52, MODE_TENKANSEN, i+1) //Ichimoku Kinko Hyo crosses below Ichimoku Kinko Hyo ) { Buffer 4 [i] = Low[i]; //Set indicator value at Candlestick Low if(i == 1 && Time[1] != time_alert) myAlert("indicator", "sell"); //Alert on next bar open time_alert = Time[1]: } else { Buffer4[i] = EMPTY_VALUE; } ) { Buffer4 [i] = Low[i]; //Set indicator value at Candlestick Low if(i == 1 && Time[1] != time_alert) myAlert("indicator", "sell"); //Alert on next bar open time_alert = Time[1]; } else { Buffer4 [i] = EMPTY_VALUE; } } return(rates_total); } // + Stock Screener Text Notes Pine Editor Strategy Tester Trading Panel Untitled Script 1 | 2 #include 3 #include 4 5 //--- indicator settings #property indicator_chart_window 7 #property indicator_buffers 4 6 8 9 10 11 12 13 14 #property indicator_type1 DRAW_ARROW #property indicator_width1 1 #property indicator_colori exFFAADO #property indicator_labeli "Buy" Add to Chart operation failed, reason: Script could not be translated from: null Stock Screener Text Notes Pine Editor Strategy Tester Trading Panel Untitled Script 1 2 #include 3 #include //--- indicator settings #property indicator_chart_window 7 #property indicator_buffers 4 9 #property indicator_type1 DRAW_ARROW #property indicator_width1 1 11 #property indicator_color1 OxFFAADO 12 #property indicator_label1 "Buy" 13 4 5 6 8 10

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning PostgreSQL On The Cloud Simplifying Database As A Service On Cloud Platforms

Authors: Baji Shaik ,Avinash Vallarapu

1st Edition

1484234464, 978-1484234464

More Books

Students also viewed these Databases questions