-
forexSignalHandle0=iCustom(NULL,0,"Forexprofitsupreme Signal",8,0,1,0,21,0,1,0,"",true,true,true,true,false,"","","","","","",2,4,0,1); forexSignalHandle1=iCustom(NULL,0,"Forexprofitsupreme Signal",8,0,1,0,21,0,1,0,"",true,true,true,true,false,"","","","","","",2,2,1,1);
MT4 does not have handles.
-
Without providing the indicator code, or a link to the exact version, no one can verify that.
-
res=OrderSend(Symbol(),OP_BUY,1,Ask,3,Ask-50000*Point,Ask+100000*Point,"SEMA",0,0,Blue);
You buy at the Ask and sell at the Bid. Pending Buy Stop orders become market orders when hit by the Ask.
-
Your buy order's TP/SL (or Sell Stop's/Sell Limit's entry) are triggered when the Bid / OrderClosePrice reaches it. Using Ask±n, makes your SL shorter and your TP longer, by the spread. Don't you want the specified amount used in either direction?
-
Your sell order's TP/SL (or Buy Stop's/Buy Limit's entry) will be triggered when the Ask / OrderClosePrice reaches it. To trigger close to a specific Bid price, add the average spread.
MODE_SPREAD (Paul) - MQL4 programming forum - Page 3 #25 -
The charts show Bid prices only. Turn on the Ask line to see how big the spread is (Tools → Options (control+O) → charts → Show ask line.)
Most brokers with variable spreads widen considerably at end of day (5 PM ET) ± 30 minutes. My GBPJPY shows average spread = 26 points, but average maximum spread = 134 (your broker will be similar).
-
-
if (Volume[0]>1) return;
For a new bar test, Bars is unreliable (a refresh/reconnect can change number of bars on chart), volume is unreliable (miss ticks), Price is unreliable (duplicate prices and The == operand. - MQL4 programming forum.) Always use time.
MT4: New candle - MQL4 programming forum #3 (2014)
MT5: Accessing variables - MQL4 programming forum #3 (2022)I disagree with making a new bar function, because it can only be called once per tick (second call returns false). A variable can be tested multiple times.
Running EA once at the start of each bar - MQL4 programming forum (2011)

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all!
So i have been trying to implement a simple trading strategy based on a custom indicator. If "Forexprofits" prints any value then go Long, if "Value 2" prints anything then open a short position and close all long positions. (attachment 2)
Unfortunately, although I think i applied the iCustom function correctly (attachment 1 from the indicator parameters and line 26/27 from code), instead of printing necessary values, what I receive is this number:
2022.06.29 12:10:28.803 2022.06.17 00:00:00 Strzałki EURUSD,Daily: forexSignal = 21474836472147483647
I am sure there is a minor mistake somewhere, however I cannot indentify it, could you please help me with this?
Is the problem somehow related to buffers?
All the best,
Sebastian