i just wanted to check this example : //input in EA, takeprofit =30; stoploss =0; //void akeprofitmodify(); if(Ask< TakeProfit) OrderModify(OrderTicket(),Ask,0,Ask+30*Point,0,0);
Is this correct? Thank you.
- OrderModify()
- Renko open bar
- Input Box
Is your program converting the takeprofit into a double?
dingo34:
Is your program converting the takeprofit into a double?
Is your program converting the takeprofit into a double?
its assumued that tp=30 pips being converted to a double.
MThomp:
It is not correct - you are comparing incompatible values
i just wanted to check this example : //input in EA, takeprofit =30; stoploss =0; //void akeprofitmodify(); if(Ask< TakeProfit) OrderModify(OrderTicket(),Ask,0,Ask+30*Point,0,0);
Is this correct? Thank you.
Mladen Rakic:
It is not correct - you are comparing incompatible values
It is not correct - you are comparing incompatible values
just wanted to check this example : //input in EA, Takeprofit =30; stoploss =0; //void Takeprofitmodify(); if(TakeProfit>0) OrderModify(OrderTicket(),Ask,0,Ask+(30*Point,0,clrNONE); Is this correct? Thank you.
There are so many fundamental flaws, it's time to stop and think about what you want to do.
- This is a (implicit) Long position
- Longs close @ the Bid not the Ask
- The price will always be less than the TP so even if the code were right (it's not, like Mladen says), the logic would ensure that all it does is constantly move the TP within the specified points of whatever the current price is, therefore it serves no purpose.
nicholi shen:
There are so many fundamental flaws, it's time to stop and think about what you want to do.
- This is a (implicit) Long position
- Longs close @ the Bid not the Ask
- The price will always be less than the TP so even if the code were right (it's not, like Mladen says), the logic would ensure that all it does is constantly move the TP within the specified points of whatever the current price is, therefore it serves no purpose.
The correct term or format for 'OrderModify' to be written where for example ,TP=80, distance=30. (assuming TP is currently zero).

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