Forum

Trying to write to file but it just creating blank file

I am trying to write SMA to file but it doesn't write to file . Can someone please tell me what I am doing wrong here..Thanks a lot in advance double ma_0= iMA ( Symbol (), PERIOD_D1 , 7 , 0 , MODE_EMA , PRICE_CLOSE , 0 ); string var1=TimeToStr( TimeCurrent (), TIME_DATE | TIME_SECONDS );

Code for trailing stop

I am using following code to set buy/sell order and than set trailing stop/loss order . It uses SMA for setting order and than set trailing stop loss on stock The issue I am seeing is the last order is not setting stop loss porperly. I have just started on MT4. It took me 2 weeks to understand pick