Need somewhere to think out loud,

Discussion in 'Journals' started by Turveyd, Jul 29, 2014.

  1. Turveyd

    Turveyd

    No shorting TP comes in at +20, Long it doesn't, bloody crappy code.
     
    #6001     Jun 17, 2020
  2. Turveyd

    Turveyd

    Fixed, bad eyes issue, sl1 not sll which on the MT4 font looks identical, well 2 pixels extra on the 1.

    SL's stopped getting too close :) moved closer as nothing crazy going on.

    Code Backup or incase any one wants MT4 Auto SL for scalping.

    -----------------------------------------------------------------------------


    extern
    string Product="Overwatch V10.01 - 4LWMA 0.03% Long 0.04% short";
    extern double MinStopLoss=4;
    extern double MaxStopLoss=10;
    extern double MaxLimit=20;
    int start()
    {
    if(OrdersTotal()>0){
    for(int i=1; i<=OrdersTotal(); i++)
    {
    if (OrderSelect(i-1,SELECT_BY_POS)==true)
    {
    if((OrderType()==OP_BUY)&&(OrderStopLoss()==0)&&(OrderSymbol()==Symbol())) {
    RefreshRates();
    double slb=NormalizeDouble(iMA(NULL,0,4,0,MODE_LWMA,PRICE_LOW,1)*0.9997,Digits);

    double sla=Bid-slb;
    if (sla<MinStopLoss){
    slb=NormalizeDouble(Bid-MinStopLoss,Digits);
    }

    if (sla>MaxStopLoss){
    slb=NormalizeDouble(Bid-MaxStopLoss,Digits);
    }

    double sll=NormalizeDouble(Ask+MaxLimit,Digits);
    OrderModify(OrderTicket(),0,slb,sll,0,CLR_NONE);
    }

    if((OrderType()==OP_SELL)&&(OrderStopLoss()==0)&&(OrderSymbol()==Symbol())) {
    RefreshRates();
    double sls=NormalizeDouble(iMA(NULL,0,4,0,MODE_LWMA,PRICE_HIGH,1)*1.0004,Digits);
    double slc=sls-Ask;
    if (slc<MinStopLoss){
    sls=NormalizeDouble(Ask+MinStopLoss,Digits);
    }
    if (slc>MaxStopLoss){
    sls=NormalizeDouble(Ask+MaxStopLoss,Digits);
    }

    double slll=NormalizeDouble(Bid-MaxLimit,Digits);
    OrderModify(OrderTicket(),0,sls,slll,0,CLR_NONE);
    }

    if((OrderType()==OP_BUY)&&(OrderStopLoss()!=0)&&(OrderSymbol()==Symbol())) {
    RefreshRates();
    double slb2=NormalizeDouble(iMA(NULL,0,4,0,MODE_LWMA,PRICE_LOW,1)*0.9997,Digits);

    double sla2=Bid-slb2;
    if (sla2<MinStopLoss){
    slb2=NormalizeDouble(Bid-MinStopLoss,Digits);
    }

    sla2=slb2-OrderStopLoss();
    if(sla2>1){
    OrderModify(OrderTicket(),0,slb2,0,0,CLR_NONE);
    }
    }


    if((OrderType()==OP_SELL)&&(OrderStopLoss()!=0)&&(OrderSymbol()==Symbol())) {
    RefreshRates();
    double sls2=NormalizeDouble(iMA(NULL,0,4,0,MODE_LWMA,PRICE_HIGH,1)*1.0004,Digits);
    double slc2=sls2-Ask;
    if (slc2<MinStopLoss){
    sls2=NormalizeDouble(Ask+MinStopLoss,Digits);
    }
    slc2=OrderStopLoss()-sls2;
    if(slc2>1){
    OrderModify(OrderTicket(),0,sls2,0,0,CLR_NONE);
    }
    }
    }
    }
    }

    int Error=GetLastError();
    if(Error==130){Alert("Wrong stops. Retrying."); RefreshRates();}
    if(Error==133){Alert("Trading prohibited.");}
    if(Error==2){Alert("Common error.");}
    if(Error==146){Alert("Trading subsystem is busy. Retrying."); Sleep(500); RefreshRates();}


    return(0);
    }
     
    #6002     Jun 17, 2020
  3. Turveyd

    Turveyd

    Definately, not the same :)
     
    #6003     Jun 17, 2020
  4. Turveyd

    Turveyd

    Feck, losing my marbles, jumped on NQ Downtrend!

    10041, took +$280 NICE DAY :) Checking P/L looks odd, -$400 errrr! ( SL Testing )

    STILL LOGGED ONTO DEMO ACCOUNT SHOOT ME!!!!
     
    #6004     Jun 17, 2020
  5. Turveyd

    Turveyd

    I remember my error, I did log back onto Live account, I just accidentally, logged onto the demo again instead thinking that was the plan doh!!

    Annoyed!!
     
    #6005     Jun 17, 2020
  6. Turveyd

    Turveyd

    How about you, making anything yet ?? what kinda trading do you do ??

    Time surely does fly too fast! When does the FUN start!!
     
    #6006     Jun 17, 2020
  7. Turveyd

    Turveyd

    Short 1002 to 9982 +$200, revenge is sweet :)

    +$350 today, going lower, just couldn't face it any more, every time I stick my kneck out, I lose my head.

    Tired, walk away, own it tomorrow :)
     
    #6007     Jun 17, 2020
  8. Turveyd

    Turveyd

    Method is finally complete, time to focus on the Trading :)

    Here are my new and final chart setup, solution was LWMA and using High and LOW from the SMA's then adding a few %%% either side, easy when you realise 10years on :)

    GAMEOVER.jpg
     
    #6008     Jun 17, 2020
  9. Turveyd

    Turveyd

    +$60, NQ Long, watch it fly LOL Good call, closed under 10K I never!!

    Getting to close to the US close for me!!

    Good day, could of been better, method is kicking butt and taking prisoners.
     
    #6009     Jun 17, 2020
  10. Turveyd

    Turveyd

    Long 9987 it'll take out the 10K I swear!! :)

    Run to 10030 area before close close close!! come on, 1 more run, daddy wants a BMW 3 Series 330D !!
     
    #6010     Jun 17, 2020