Forum

Magic Number Added To Indicator.

I am new to coding and I added a magic number to this Indicator. I get no errors but when I put the Indicator on 2 charts with 2 different EAs the Indicators TakeProfit Left and StopLoss Left only works with one of the EAs. Any help would be appreciated

INFO indicator I need help with this code.

I want this to do something when the current stoploss is greater than the previos stoploss. Can someone help? Please? for ( int i = PositionsTotal ()- 1 ; i >= 0 ; i--) { ulong posTicket = PositionGetTicket (i); if ( PositionSelectByTicket (posTicket)) { double

OrderClose

I would like this code to close trades when the trailing stop reaches 100 points. Can anyone help? for ( int i= OrdersTotal ()- 1 ; i >= 0 ; i--) { if ( OrderSelect (i,SELECT_BY_POS)==True) { if (OrderSymbol()== _Symbol && OrderType()==OP_BUY) {

Stop loss take profit

I was wondering if someone could please make me a small Indicator that will print in the left top corner of my chart, the stop loss and take profit values of the open trade

Comments

How can I Comment StopLoss and TakeProfit values on my chart using an EA

Minimum lot size

I have this money managment code that works fine when minimum lots aloud by broker is 0.01. but I can't figure out how to set it to minimum lot size = 10.0 .I know I have to change the last diget of the code from 2 with two diget after the decimal to another number to make it to 10.0 but I don't now

Move stoploss every second pip.

#property copyright "2023, SqueezePlayMA" #include <Trade/Trade.mqh> CTrade trade; ulong trade_ticket = 0; bool time_passed = true; double open_trade_price = 0; input group "SqueezePlayMA"; input group "Open Trade"; input int MovingAverage = 2; input group "Close Trade"; input int HitNumber = 100;

Validation completed with errors

I am trying to Validate my Expert Advisor to put on the Market. I get this error when attempting to Validate. test on EURUSD,H1 there are no trading operations test on NZDUSD,H1 there are no trading operations test on GBPUSDcheck,M30 there are no trading operations test on XAUUSDcheck,Daily there