I am trying to use a custom indicator in my EA and am not sure how exactly to do so.
I am using Gravity Center2, a COG custom indicator. It has 3 external options which I have added to the iCustom but when I try to test the EA in the strategy tester it gets to about 50% on the progress bar and hangs there.
This code should check if the bars open price is below the custom indicators Level 6. Note that the indicator has 7 buffers, 0-6.... 5 is level 6.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I am trying to use a custom indicator in my EA and am not sure how exactly to do so.
I am using Gravity Center2, a COG custom indicator. It has 3 external options which I have added to the iCustom but when I try to test the EA in the strategy tester it gets to about 50% on the progress bar and hangs there.
This code should check if the bars open price is below the custom indicators Level 6. Note that the indicator has 7 buffers, 0-6.... 5 is level 6.
double COG_L6=iCustom(Symb,Trade_Period,"Gravity Center2",Number_Of_Bars,Order,Ecart,5,0);
double Current_Open=iOpen(Symb,Trade_Period,0)
if(Current_Open < COG_L6){
Print("Bar Opened Below COG Level 6.");
}