
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello juan
can you tell us if it is good strategy, did it work for you?
Did you notice this ? juanmanuel 2007. 10.26 05:15
Why are you asking about a 5 year old post ?
Did you notice this ? juanmanuel 2007. 10.26 05:15
Why are you asking about a 5 year old post ?
Hello RaptorUK
actually i am new at this field, i am trying to program EA use parabolic SAR indicator
and behave like this:
open buy order when SAR change from above to below of candles, with fixed TP and SL
and close it if the SAR change its direction and didn't hit TP or SL
i did this till now: (but its not opening any order):
extern double Step =0.02; //Parabolic setting
extern double Maximum =0.2; //Parabolic setting
extern double Lots=1;
extern int Slip=5;
extern int flag1=0;
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
//open order criteria
if ((iSAR(NULL, 0,Step,Maximum, 0)<iClose(NULL,0,0))&&(iSAR(NULL, 0,Step,Maximum, 1)>iOpen(NULL,0,1))) //Signal Buy
{
int opensell=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slip,NormalizeDouble(Bid+25*Point,Digits),NormalizeDouble(Bid-25*Point,Digits),"MY trader sell order",0,0,Green);
flag1=1;
}
if ((iSAR(NULL, 0,Step,Maximum, 0)>iClose(NULL,0,0))&&(iSAR(NULL, 0,Step,Maximum, 1)<iOpen(NULL,0,1))) //Signal Sell
{
int openbuy=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slip,NormalizeDouble(Ask-25*Point,Digits),NormalizeDouble(Ask+25*Point,Digits),"MY trader buy order",0,0,Blue);
flag1=1;
}
Hello RaptorUK
actually i am new at this field, i am trying to program EA use parabolic SAR indicator
and behave like this:
open buy order when SAR change from above to below of candles, with fixed TP and SL
and close it if the SAR change its direction and didn't hit TP or SL
i did this till now: (but its not opening any order):
<CODE REMOVED>
Please edit your post . . . please use the SRC button to post code: How to use the SRC button.
Hello RaptorUK
actually i am new at this field, i am trying to program EA use parabolic SAR indicator
and behave like this:
open buy order when SAR change from above to below of candles, with fixed TP and SL
and close it if the SAR change its direction and didn't hit TP or SL
i did this till now: (but its not opening any order):
Why not ? is the OrderSend failing ? why aren't you checking the return value from the OrderSend() to see if it has failed ? Read this: What are Function return values ? How do I use them ?
Does your OrderSend() get called ? are you printing the values of the following . . .
so you know if your conditions to place a trade are met ? why not ?
Why not ? is the OrderSend failing ? why aren't you checking the return value from the OrderSend() to see if it has failed ? Read this: What are Function return values ? How do I use them ?
Does your OrderSend() get called ? are you printing the values of the following . . .
so you know if your conditions to place a trade are met ? why not ?
thanks for your help :)